summaryrefslogtreecommitdiff
path: root/posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html')
-rw-r--r--posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html b/posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html
index 5365d89..5ae4c38 100644
--- a/posts/2019-12-16-TensorFlow-Polynomial-Regression/index.html
+++ b/posts/2019-12-16-TensorFlow-Polynomial-Regression/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-16-TensorFlow-Polynomial-Regression"/><meta name="twitter:url" content="https://navanchauhan.github.io/posts/2019-12-16-TensorFlow-Polynomial-Regression"/><meta name="og:url" content="https://navanchauhan.github.io/posts/2019-12-16-TensorFlow-Polynomial-Regression"/><title>Polynomial Regression Using TensorFlow | Navan Chauhan</title><meta name="twitter:title" content="Polynomial Regression Using TensorFlow | Navan Chauhan"/><meta name="og:title" content="Polynomial Regression Using TensorFlow | Navan Chauhan"/><meta name="description" content="Polynomial regression using TensorFlow"/><meta name="twitter:description" content="Polynomial regression using TensorFlow"/><meta name="og:description" content="Polynomial regression using TensorFlow"/><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 src="https://www.googletagmanager.com/gtag/js?id=UA-108635191-1v"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-108635191-1');</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">17 minute read</span><span class="reading-time">Created on December 16, 2019</span><span class="reading-time">Last modified on January 18, 2020</span><h1>Polynomial Regression Using TensorFlow</h1><p><strong>In this tutorial you will learn about polynomial regression and how you can implement it in Tensorflow.</strong></p><p>In this, we will be performing polynomial regression using 5 types of equations -</p><ul><li>Linear</li><li>Quadratic</li><li>Cubic</li><li>Quartic</li><li>Quintic</li></ul><h2>Regression</h2><h3>What is Regression?</h3><p>Regression is a statistical measurement that is used to try to determine the relationship between a dependent variable (often denoted by Y), and series of varying variables (called independent variables, often denoted by X ).</p><h3>What is Polynomial Regression</h3><p>This is a form of Regression Analysis where the relationship between Y and X is denoted as the nth degree/power of X. Polynomial regression even fits a non-linear relationship (e.g when the points don't form a straight line).</p><h2>Imports</h2><pre><code><div class="highlight"><span></span><span class="kn">import</span> <span class="nn">tensorflow.compat.v1</span> <span class="k">as</span> <span class="nn">tf</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-16-TensorFlow-Polynomial-Regression"/><meta name="twitter:url" content="https://navanchauhan.github.io/posts/2019-12-16-TensorFlow-Polynomial-Regression"/><meta name="og:url" content="https://navanchauhan.github.io/posts/2019-12-16-TensorFlow-Polynomial-Regression"/><title>Polynomial Regression Using TensorFlow | Navan Chauhan</title><meta name="twitter:title" content="Polynomial Regression Using TensorFlow | Navan Chauhan"/><meta name="og:title" content="Polynomial Regression Using TensorFlow | Navan Chauhan"/><meta name="description" content="Polynomial regression using TensorFlow"/><meta name="twitter:description" content="Polynomial regression using TensorFlow"/><meta name="og:description" content="Polynomial regression using TensorFlow"/><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 src="https://www.googletagmanager.com/gtag/js?id=UA-108635191-1v"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-108635191-1');</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">17 minute read</span><span class="reading-time">Created on December 16, 2019</span><span class="reading-time">Last modified on June 1, 2020</span><h1>Polynomial Regression Using TensorFlow</h1><p><strong>In this tutorial you will learn about polynomial regression and how you can implement it in Tensorflow.</strong></p><p>In this, we will be performing polynomial regression using 5 types of equations -</p><ul><li>Linear</li><li>Quadratic</li><li>Cubic</li><li>Quartic</li><li>Quintic</li></ul><h2>Regression</h2><h3>What is Regression?</h3><p>Regression is a statistical measurement that is used to try to determine the relationship between a dependent variable (often denoted by Y), and series of varying variables (called independent variables, often denoted by X ).</p><h3>What is Polynomial Regression</h3><p>This is a form of Regression Analysis where the relationship between Y and X is denoted as the nth degree/power of X. Polynomial regression even fits a non-linear relationship (e.g when the points don't form a straight line).</p><h2>Imports</h2><pre><code><div class="highlight"><span></span><span class="kn">import</span> <span class="nn">tensorflow.compat.v1</span> <span class="k">as</span> <span class="nn">tf</span>
<span class="n">tf</span><span class="o">.</span><span class="n">disable_v2_behavior</span><span class="p">()</span>
<span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
@@ -304,4 +304,4 @@
<span class="n">plt</span><span class="o">.</span><span class="n">title</span><span class="p">(</span><span class="s1">&#39;Quintic Regression Result&#39;</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">legend</span><span class="p">()</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
-</div></code></pre><img src="/assets/gciTales/03-regression/6.png"/><h2>Results and Conclusion</h2><p>You just learnt Polynomial Regression using TensorFlow!</p><h2>Notes</h2><h3>Overfitting</h3><blockquote><p>&gt; Overfitting refers to a model that models the training data too well.Overfitting happens when a model learns the detail and noise in the training data to the extent that it negatively impacts the performance of the model on new data. This means that the noise or random fluctuations in the training data is picked up and learned as concepts by the model. The problem is that these concepts do not apply to new data and negatively impact the models ability to generalize.</p></blockquote><blockquote><p>Source: Machine Learning Mastery</p></blockquote><p>Basically if you train your machine learning model on a small dataset for a really large number of epochs, the model will learn all the deformities/noise in the data and will actually think that it is a normal part. Therefore when it will see some new data, it will discard that new data as noise and will impact the accuracy of the model in a negative manner</p></div><span>Tagged with: </span><ul class="tag-list"><li><a href="/tags/tutorial">tutorial</a></li><li><a href="/tags/tensorflow">tensorflow</a></li><li><a href="/tags/colab">colab</a></li></ul><div id="disqus_thread"></div><script src="/assets/disqus.js"></script><noscript>Please enable JavaScript to view the comments</noscript></article></div><footer><p>Made with ❤️ using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html> \ No newline at end of file
+</div></code></pre><img src="/assets/gciTales/03-regression/6.png"/><h2>Results and Conclusion</h2><p>You just learnt Polynomial Regression using TensorFlow!</p><h2>Notes</h2><h3>Overfitting</h3><blockquote><p>&gt; Overfitting refers to a model that models the training data too well.Overfitting happens when a model learns the detail and noise in the training data to the extent that it negatively impacts the performance of the model on new data. This means that the noise or random fluctuations in the training data is picked up and learned as concepts by the model. The problem is that these concepts do not apply to new data and negatively impact the models ability to generalize.</p></blockquote><blockquote><p>Source: Machine Learning Mastery</p></blockquote><p>Basically if you train your machine learning model on a small dataset for a really large number of epochs, the model will learn all the deformities/noise in the data and will actually think that it is a normal part. Therefore when it will see some new data, it will discard that new data as noise and will impact the accuracy of the model in a negative manner</p></div><span>Tagged with: </span><ul class="tag-list"><li><a href="/tags/tutorial">Tutorial</a></li><li><a href="/tags/tensorflow">Tensorflow</a></li><li><a href="/tags/colab">Colab</a></li></ul><div id="disqus_thread"></div><script src="/assets/disqus.js"></script><noscript>Please enable JavaScript to view the comments</noscript></article></div><footer><p>Made with ❤️ using <a href="https://github.com/johnsundell/publish">Publish</a></p><p><a href="/feed.rss">RSS feed</a></p></footer></body></html> \ No newline at end of file