summaryrefslogtreecommitdiff
path: root/posts/2019-12-22-Fake-News-Detector/index.html
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-11-23 19:39:48 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-11-23 19:39:48 +0530
commit8fa0d4cc58b844d84f7b1bf6f269162b645a2f0d (patch)
tree3c40f7146ee0f998f68996c86a5e2e186438996d /posts/2019-12-22-Fake-News-Detector/index.html
parent1ec11bab878a401ec106227d5c7e03179b5114cb (diff)
Publish deploy 2020-11-23 19:39
Diffstat (limited to 'posts/2019-12-22-Fake-News-Detector/index.html')
-rw-r--r--posts/2019-12-22-Fake-News-Detector/index.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/posts/2019-12-22-Fake-News-Detector/index.html b/posts/2019-12-22-Fake-News-Detector/index.html
index 14c4770..f6dbc67 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 @@
-<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/posts/2019-12-22-Fake-News-Detector"/><meta name="twitter:url" content="https://navanchauhan.github.io/posts/2019-12-22-Fake-News-Detector"/><meta name="og:url" content="https://navanchauhan.github.io/posts/2019-12-22-Fake-News-Detector"/><title>Building a Fake News Detector with Turicreate | Navan Chauhan</title><meta name="twitter:title" content="Building a Fake News Detector with Turicreate | Navan Chauhan"/><meta name="og:title" content="Building a Fake News Detector with Turicreate | Navan Chauhan"/><meta name="description" content="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"/><meta name="twitter:description" content="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"/><meta name="og:description" content="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"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/images/logo.png"/></head><head><script>var _paq=window._paq=window._paq||[];_paq.push(['trackPageView']),_paq.push(['enableLinkTracking']),function(){var a='https://navanspi.duckdns.org:6969/analytics/';_paq.push(['setTrackerUrl',a+'matomo.php']),_paq.push(['setSiteId','2']);var e=document,t=e.createElement('script'),p=e.getElementsByTagName('script')[0];t.type='text/javascript',t.async=!0,t.src=a+'matomo.js',p.parentNode.insertBefore(t,p)}();</script></head><body class="item-page"><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/about">About Me</a></li><li><a class="selected" href="/posts">Posts</a></li><li><a href="/publications">Publications</a></li><li><a href="/assets/résumé.pdf">Résumé</a></li><li><a href="https://navanchauhan.github.io/repo">Repo</a></li></ul></nav></div></header><div class="wrapper"><article><div class="content"><span class="reading-time">7 minute read</span><span class="reading-time">Created on December 22, 2019</span><span class="reading-time">Last modified on September 15, 2020</span><h1>Building a Fake News Detector with Turicreate</h1><p><strong>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</strong></p><p>Note: These commands are written as if you are running a jupyter notebook.</p><h2>Building the Machine Learning Model</h2><h3>Data Gathering</h3><p>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</p><h3>Dependencies</h3><p>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 a CUDA compatible MXNet package.</p><pre><code><div class="highlight"><span></span><span class="nt">!pip</span><span class="na"> install turicreate</span>
+<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"/><meta name="og:site_name" content="Navan Chauhan"/><link rel="canonical" href="https://navanchauhan.github.io/posts/2019-12-22-Fake-News-Detector"/><meta name="twitter:url" content="https://navanchauhan.github.io/posts/2019-12-22-Fake-News-Detector"/><meta name="og:url" content="https://navanchauhan.github.io/posts/2019-12-22-Fake-News-Detector"/><title>Building a Fake News Detector with Turicreate | Navan Chauhan</title><meta name="twitter:title" content="Building a Fake News Detector with Turicreate | Navan Chauhan"/><meta name="og:title" content="Building a Fake News Detector with Turicreate | Navan Chauhan"/><meta name="description" content="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"/><meta name="twitter:description" content="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"/><meta name="og:description" content="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"/><meta name="twitter:card" content="summary"/><link rel="stylesheet" href="/styles.css" type="text/css"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="shortcut icon" href="/images/favicon.png" type="image/png"/><link rel="alternate" href="/feed.rss" type="application/rss+xml" title="Subscribe to Navan Chauhan"/><meta name="twitter:image" content="https://navanchauhan.github.io/images/logo.png"/><meta name="og:image" content="https://navanchauhan.github.io/images/logo.png"/></head><head><script async src="//gc.zgo.at/count.js" data-goatcounter="https://navanchauhan.goatcounter.com/count"></script></head><body class="item-page"><header><div class="wrapper"><a class="site-name" href="/">Navan Chauhan</a><nav><ul><li><a href="/about">About Me</a></li><li><a class="selected" href="/posts">Posts</a></li><li><a href="/publications">Publications</a></li><li><a href="/assets/résumé.pdf">Résumé</a></li><li><a href="https://navanchauhan.github.io/repo">Repo</a></li></ul></nav></div></header><div class="wrapper"><article><div class="content"><span class="reading-time">7 minute read</span><span class="reading-time">Created on December 22, 2019</span><span class="reading-time">Last modified on September 15, 2020</span><h1>Building a Fake News Detector with Turicreate</h1><p><strong>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</strong></p><p>Note: These commands are written as if you are running a jupyter notebook.</p><h2>Building the Machine Learning Model</h2><h3>Data Gathering</h3><p>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</p><h3>Dependencies</h3><p>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 a CUDA compatible MXNet package.</p><pre><code><div class="highlight"><span></span><span class="nt">!pip</span><span class="na"> install turicreate</span>
<span class="na">!pip uninstall -y mxnet</span>
<span class="na">!pip install mxnet-cu100==1.4.0.post0</span>
</div></code></pre><p>If you do not wish to train on GPU or are running it on your computer, you can ignore the last two lines</p><h3>Downloading the Dataset</h3><pre><code><div class="highlight"><span></span><span class="nt">!wget</span><span class="na"> -q &quot;https</span><span class="p">:</span><span class="nc">//github.com/joolsa/fake_real_news_dataset/raw/master/fake_or_real_news.csv.zip&quot;</span>