From 5c712abef6b9fded9c3d0b7bb930cdfeb94981d1 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 18 Aug 2020 20:41:29 +0530 Subject: Publish deploy 2020-08-18 20:41 --- posts/2019-12-22-Fake-News-Detector/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'posts/2019-12-22-Fake-News-Detector/index.html') diff --git a/posts/2019-12-22-Fake-News-Detector/index.html b/posts/2019-12-22-Fake-News-Detector/index.html index 8708b90..e6e45d8 100644 --- a/posts/2019-12-22-Fake-News-Detector/index.html +++ b/posts/2019-12-22-Fake-News-Detector/index.html @@ -1,4 +1,4 @@ -Building a Fake News Detector with Turicreate | Navan Chauhan
7 minute readCreated on December 22, 2019Last modified on June 1, 2020

Building a Fake News Detector with Turicreate

In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app

Note: These commands are written as if you are running a jupyter notebook.

Building the Machine Learning Model

Data Gathering

To build a classifier, you need a lot of data. George McIntire (GH: @joolsa) has created a wonderful dataset containing the headline, body and wheter it is fake or real. Whenever you are looking for a dataset, always try searching on Kaggle and GitHub before you start building your own

Dependencies

I used a Google Colab instance for training my model. If you also plan on using Google Colab then I reccomend choosing a GPU Instance (It is Free) This allows you to train the model on the GPU. Turicreat is built on top of Apache's MXNet Framework, for us to use GPU we need to install a CUDA compatible MXNet package.

!pip install turicreate +Building a Fake News Detector with Turicreate | Navan Chauhan
7 minute readCreated on December 22, 2019Last modified on June 1, 2020

Building a Fake News Detector with Turicreate

In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app

Note: These commands are written as if you are running a jupyter notebook.

Building the Machine Learning Model

Data Gathering

To build a classifier, you need a lot of data. George McIntire (GH: @joolsa) has created a wonderful dataset containing the headline, body and wheter it is fake or real. Whenever you are looking for a dataset, always try searching on Kaggle and GitHub before you start building your own

Dependencies

I used a Google Colab instance for training my model. If you also plan on using Google Colab then I reccomend choosing a GPU Instance (It is Free) This allows you to train the model on the GPU. Turicreat is built on top of Apache's MXNet Framework, for us to use GPU we need to install a CUDA compatible MXNet package.

!pip install turicreate !pip uninstall -y mxnet !pip install mxnet-cu100==1.4.0.post0

If you do not wish to train on GPU or are running it on your computer, you can ignore the last two lines

Downloading the Dataset

!wget -q "https://github.com/joolsa/fake_real_news_dataset/raw/master/fake_or_real_news.csv.zip" -- cgit v1.2.3