From f5faa2ef095f035110f83e17da0b35d3a34d6b97 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sat, 17 Feb 2024 19:52:53 -0700 Subject: bump --- docs/posts/2019-12-22-Fake-News-Detector.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index 6979c19..17ecaa1 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -26,7 +26,7 @@ - + @@ -35,6 +35,7 @@ home | about/links | posts | +3D designs | RSS Feed | -- cgit v1.2.3 From f6d2141a480dd6b5b8ee0e48d43bb64773232791 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 26 Mar 2024 23:38:14 -0600 Subject: add header ids --- docs/posts/2019-12-22-Fake-News-Detector.html | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index 17ecaa1..a7216aa 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -6,13 +6,13 @@ - Building a Fake News Detector with Turicreate + id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate - - + Building a Fake News Detector with Turicreate" /> + Building a Fake News Detector with Turicreate" /> @@ -44,20 +44,20 @@
-

Building a Fake News Detector with Turicreate

+

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

+

Building the Machine Learning Model

-

Data Gathering

+

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 whether 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

+

Dependencies

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

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

+

Downloading the Dataset

!wget -q "https://github.com/joolsa/fake_real_news_dataset/raw/master/fake_or_real_news.csv.zip"
@@ -80,7 +80,7 @@ a CUDA compatible MXNet package.

-

Model Creation

+

Model Creation

import turicreate as tc
@@ -100,14 +100,14 @@ a CUDA compatible MXNet package.

-

Splitting Dataset

+

Splitting Dataset

train, test = dataSFrame.random_split(.9)
 
-

Training

+

Training

model = tc.text_classifier.create(
@@ -132,7 +132,7 @@ a CUDA compatible MXNet package.

-

Testing the Model

+

Testing the Model

est_predictions = model.predict(test)
@@ -165,7 +165,7 @@ a CUDA compatible MXNet package.

-

Exporting the Model

+

Exporting the Model

model_name = 'FakeNews'
@@ -178,9 +178,9 @@ a CUDA compatible MXNet package.

Link to Colab Notebook

-

Building the App using SwiftUI

+

Building the App using SwiftUI

-

Initial Setup

+

Initial Setup

First we create a single view app (make sure you check the use SwiftUI button)

-- cgit v1.2.3 From 9e620084e57378952c1a7f8e0a772ebebd18932b Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 27 Mar 2024 20:35:09 -0600 Subject: quick fix --- docs/posts/2019-12-22-Fake-News-Detector.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index a7216aa..553831d 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -6,13 +6,13 @@ - id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate + Building a Fake News Detector with Turicreate - Building a Fake News Detector with Turicreate" /> - Building a Fake News Detector with Turicreate" /> + + -- cgit v1.2.3 From 01ff93c9c16867216f2d249664803860e1d6d5eb Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 27 Mar 2024 22:49:40 -0600 Subject: generate new theme --- docs/posts/2019-12-22-Fake-News-Detector.html | 55 ++++++++++++++++++--------- 1 file changed, 37 insertions(+), 18 deletions(-) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index 553831d..8b784e5 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -2,14 +2,26 @@ - + + + + + Building a Fake News Detector with Turicreate + + + + + + + - Building a Fake News Detector with Turicreate - @@ -29,21 +41,27 @@ - -
-
+ + +
-
- +

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

@@ -308,14 +326,15 @@ DescriptionThe bag-of-words model is a simplifying representation used in NLP, i
+
If you have scrolled this far, consider subscribing to my mailing list here. You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.
-
+ -- cgit v1.2.3 From de19543d7fb44d343b052dc9b34ede78620c4a46 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 27 Mar 2024 23:36:55 -0600 Subject: Generate --- docs/posts/2019-12-22-Fake-News-Detector.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index 8b784e5..bb22f48 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -46,7 +46,7 @@ + +
-- cgit v1.2.3 From a982ceab0b45609991179b3020a00260eed6f798 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 27 Mar 2024 23:45:59 -0600 Subject: css --- docs/posts/2019-12-22-Fake-News-Detector.html | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/posts/2019-12-22-Fake-News-Detector.html') diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html index bb22f48..3a7a843 100644 --- a/docs/posts/2019-12-22-Fake-News-Detector.html +++ b/docs/posts/2019-12-22-Fake-News-Detector.html @@ -5,6 +5,7 @@ + Building a Fake News Detector with Turicreate -- cgit v1.2.3