<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arjun Patel on Medium]]></title>
        <description><![CDATA[Stories by Arjun Patel on Medium]]></description>
        <link>https://medium.com/@arjoonpatel?source=rss-b48cf2c03ac8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*G0pv9LE5VLuckDP3hgHg-g.jpeg</url>
            <title>Stories by Arjun Patel on Medium</title>
            <link>https://medium.com/@arjoonpatel?source=rss-b48cf2c03ac8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 17:55:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arjoonpatel/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Getting started with Machine Learning in 5 minutes]]></title>
            <link>https://medium.com/@arjoonpatel/getting-started-with-machine-learning-in-5-minutes-b619490dce81?source=rss-b48cf2c03ac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b619490dce81</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Arjun Patel]]></dc:creator>
            <pubDate>Sun, 08 Mar 2020 23:37:37 GMT</pubDate>
            <atom:updated>2020-03-08T23:37:37.167Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn Machine Learning by building home price prediction in 15 lines of code.</h4><p><em>This blog post was originally published on HP Developers site.</em></p><p>Machine Learning is here to stay. Whether it will lead to singularity is still speculative, however, will it change the way software engineers solve problems should not be questioned. It is already being implemented by many companies to create richer UX like with Apple ARKit (cool examples at <a href="http://www.madewitharkit.com/">madewitharkit.com</a>) and answer complex questions like with Amazon Echo. Here at HP, we use it to answer complex challenges we face around <a href="http://www8.hp.com/us/en/printers/3d-printers.html">3D printing</a> to part performance optimization and to even print customized <a href="https://www.fitstation.com/">footwear</a>. Machine Learning is a very powerful technique that problem-solvers must understand now — not next year.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lB-ccGvQgzApS62i1ojTnw.png" /><figcaption>Dang, even the television program HBO Silicon Valley show’s intern is building apps with ML!</figcaption></figure><h3>Applied Machine Learning</h3><p>Machine Learning has a lot of moving parts. In this post, I will demystify ML by helping you write working code. And I will discuss what you can do to take the next step.</p><p>First, consider how software was written before the advent of Machine Learning. Software engineers gave computers step-by-step instructions to solve a specific problem.</p><p>Let’s use an example from the banking industry. Say we wanted to write a program that would predict whether a loan applicant was likely to pay back their loan. We could write a program that analyzes that individual’s profile, setting parameters for key variables:</p><ul><li>Credit score</li><li>Loan amount</li><li>Type of loan</li><li>Length of membership</li></ul><p>The programming logic would look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I2GeGDa9f0gHAkHxVuUx4Q.png" /><figcaption><em>Fig 1. Simple bank loan approval programmatic logic</em></figcaption></figure><p>Based on the complexity of a problem, these manual steps of tweaking parameters and writing instructions may become complex or even impossible. Imagine the complexity of coding for object recognition.</p><p>With Machine Learning, the engineer can train an ML model that learns from loan data from thousands of borrowers. The ML model can keep improving over time, responding to more data and new trends. For example, after the Equifax security breach in 2017, credit scores from Equifax may not be as valuable as scores from the other two credit reporting agencies. If this is reflected in real loan outcomes, the ML model would tweak its parameters to give less weight to Equifax credit scores. With enough data, the ML model will train itself to find optimum parameters.</p><p>This technique is called <em>supervised learning</em>. We will use it in our tutorial below. (The other popular techniques are <em>unsupervised learning</em> and <em>reinforcement learning</em>.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FVFBr7o5GmD6I6IbGsGt9A.png" /><figcaption><em>Fig 2. Simple bank loan approval ML logic</em></figcaption></figure><h3>Home Price Prediction Tutorial</h3><p>The fastest way to learn about Machine Learning is to build a learning machine, so let’s build our own Home Price Predictor. Let’s say each house has a base value of $240k and each bedroom adds $15k to the price. (We use “k” to abbreviate 1,000 to keep the numbers small.)</p><pre>| Bedrooms | Home Price |<br>|----------|------------|<br>|     0    |    $240k   |<br>|     1    |    $255k   |<br>|     2    |    $270k   |<br>|     3    |    $285k   |<br>|     4    |    $300k   |</pre><p>Predicting a house price requires a simple linear model (y = mx + b). We can use this formula:</p><pre>Price of house = ($15k * # of bedrooms) + $240k</pre><p>Now let’s build a Machine Learning program to do this. Using the training data, we want our model to figure out the values of <strong>m</strong> and<strong> </strong><strong>b</strong>, which we know will be 15 and 240, respectively.</p><p>We will be using python for our code. Create a new python file with the code below and name it <strong>home_price.py.</strong> In the code, we start by importing the library, setting up some initial variables, linear model and loss function. Consider installing <a href="https://www.docker.com/">Docker</a> and using the following Docker command if you don’t have your environment setup.</p><pre>docker run -it gcr.io/tensorflow/tensorflow:latest /bin/bash</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c28651b5175e9a436949ba1de4234c3c/href">https://medium.com/media/c28651b5175e9a436949ba1de4234c3c/href</a></iframe><p>In the code, we are setting up some basic placeholders and variables to be used during training. Then we are writing a loss function, which is calculated by subtracting y (the given value or ground truth) from the prediction value. We then pass that loss value to our optimizer. With each iteration, our optimizer will try to get the values of y and prediction as close as possible by updating the value of the variables m and b.</p><p>Next, we are training the model 1000 times with our training data. At the end, you should get outputs which look like this</p><pre><strong>Value of m is [ 15.00007153] and value of b is [ 239.99978638].</strong></pre><p><strong><em>What do you think of the values for m and b? Very close to our expected values, right? </em>💁</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*gHQ2bc-0tkEWYi8g_XnMAg.jpeg" /></figure><p>Below is the visualization of how the model is being optimized at each iteration. In the beginning values of m and b are starting at 1.0 (as we specified in our code), but over time they get to the right values. And we are also seeing our loss (prediction — y) decrease to 0 overtime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TBLHOD0TCDdJKp9XJJA4rw.png" /><figcaption><em>Fig 3. Values of </em><em>m, </em><em>b and </em><em>loss over 100 iterations.</em></figcaption></figure><blockquote>Q. How would you account for a neighborhood in your Home Price Predictor?</blockquote><blockquote>Q. How would you take home images into consideration?</blockquote><p>Hopefully, the above tutorial helped you understand the basics of ML. Soon every full-stack engineer will be using ML in their applications. We are not far from npm install object-detect.</p><p><strong>If you would like to discuss more on ML or need help understanding if ML can be applied to your problem, feel free to reach out to me. I’m happy to help.</strong></p><p><strong><em>Thanks for reading! Feel free to hit the recommend button below if you found this piece interesting!</em></strong></p><p><strong><em>You can connect with me on </em></strong><a href="https://twitter.com/arjoonpatel"><strong><em>Twitter</em></strong></a><strong><em> or </em></strong><a href="https://www.linkedin.com/in/arjunpatel/"><strong><em>LinedIn</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b619490dce81" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with Machine Learning in 5 minutes]]></title>
            <link>https://medium.com/hackernoon/getting-started-with-machine-learning-in-15-lines-of-code-4112c405f9a4?source=rss-b48cf2c03ac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4112c405f9a4</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[hp]]></category>
            <dc:creator><![CDATA[Arjun Patel]]></dc:creator>
            <pubDate>Wed, 18 Oct 2017 14:48:08 GMT</pubDate>
            <atom:updated>2019-04-26T10:22:48.842Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn Machine Learning by building home price prediction in 15 lines of code.</h4><p><em>This blog post was originally published on </em><a href="https://developers.hp.com/?source=hackernoon"><em>HP Developers Portal</em></a><em> (</em><a href="https://developers.hp.com/?source=hackernoon"><em>hp.io</em></a><em>).</em></p><p><a href="https://hackernoon.com/tagged/machine-learning">Machine Learning</a> is here to stay. Whether it will lead to singularity is still speculative, however, will it change the way software engineers solve problems should not be questioned. It is already being implemented by many companies to create richer UX like with Apple <a href="https://hackernoon.com/tagged/arkit">ARKit</a> (cool examples at <a href="http://www.madewitharkit.com/">madewitharkit.com</a>) and answer complex questions like with Amazon Echo. Here at HP, we use it to answer complex challenges we face around <a href="http://www8.hp.com/us/en/printers/3d-printers.html">3D printing</a> to part performance optimization and to even print customized <a href="https://www.fitstation.com/">footware</a>. Machine Learning is a very powerful technique that problem solvers must understand now — not next year.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lB-ccGvQgzApS62i1ojTnw.png" /><figcaption>Dang, even the television program HBO Silicon Valley show’s intern is building apps with ML!</figcaption></figure><h3>Applied Machine Learning</h3><p>Machine Learning has a lot of moving parts. In this post, I will demystify ML by helping you write working code. And I will discuss what you can do to take the next step.</p><p>First consider how software was written before the advent of Machine Learning. Software engineers gave computers step-by-step instructions to solve a specific problem.</p><p>Let’s use an example from the banking industry. Say we wanted to write a program that would predict whether a loan applicant was likely to pay back their loan. We could write a program that analyzes that individual’s profile, setting parameters for key variables:</p><ul><li>Credit score</li><li>Loan amount</li><li>Type of loan</li><li>Length of membership</li></ul><p>The programming logic would look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I2GeGDa9f0gHAkHxVuUx4Q.png" /><figcaption><em>Fig 1. Simple bank loan approval programmatic logic</em></figcaption></figure><p>Based on the complexity of a problem, these manual steps of tweaking parameters and writing instructions may become complex or even impossible. Imagine the complexity of coding for object recognition.</p><blockquote>Now a machine can learn to solve problems just by looking at examples.</blockquote><p>With Machine Learning, the engineer can train an ML model that learns from loan data from thousands of borrowers. The ML model can keep improving over time, responding to more data and new trends. For example, after the Equifax security breach in 2017, credit scores from Equifax may not be as valuable as scores from the other two credit reporting agencies. If this is reflected with real loan outcomes, the ML model would tweak its parameters to give less weight to Equifax credit scores. With enough data, the ML model will train itself to find optimum parameters.</p><p>This technique is called <em>supervised learning</em>. We will use it in our tutorial below. (The other popular techniques are <em>unsupervised learning</em> and <em>reinforcement learning</em>.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FVFBr7o5GmD6I6IbGsGt9A.png" /><figcaption><em>Fig 2. Simple bank loan approval ML logic</em></figcaption></figure><h3>Home Price Prediction Tutorial</h3><p>The fastest way to learn about Machine Learning is to build a learning machine, so let’s build our own Home Price Predictor. Let’s say each house has a base value of $240k and each bedroom adds $15k to the price. (We use “k” to abbreviate 1,000 to keep the numbers small.)</p><pre>| Bedrooms | Home Price |<br>|----------|------------|<br>|     0    |    $240k   |<br>|     1    |    $255k   |<br>|     2    |    $270k   |<br>|     3    |    $285k   |<br>|     4    |    $300k   |</pre><p>Predicting a house price requires a simple linear model (y = mx + b). We can use this formula:</p><pre>Price of house = ($15k * # of bedrooms) + $240k</pre><p>Now let’s build a Machine Learning program to do this. Using the training data, we want our model to figure out the values of <strong>m</strong> and<strong> </strong><strong>b</strong>, which we know will be 15 and 240, respectively.</p><p>We will be using python for our code. Create a new python file with the code below and name it <strong>home_price.py.</strong> In the code, we start by importing the library, setting up some initial variables, linear model and loss function. Consider installing <a href="https://www.docker.com/">Docker</a> and using the following Docker Command if you don’t have your environment setup.</p><pre>docker run -it gcr.io/tensorflow/tensorflow:latest /bin/bash</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c28651b5175e9a436949ba1de4234c3c/href">https://medium.com/media/c28651b5175e9a436949ba1de4234c3c/href</a></iframe><p>In the code, we are setting up some basic placeholders and variables to be used during training. Then we are writing a loss function, which is calculated by subtracting y (the given value or ground truth) from the prediction value. We then pass that loss value to our optimizer. With each iteration, our optimizer will try to get the values of y and prediction as close as possible by updating the value of the variables m and b.</p><p>Next, we are training the model 1000 times with our training data. At the end you should get outputs which look like this</p><pre><strong>Value of m is [ 15.00007153] and value of b is [ 239.99978638].</strong></pre><p><strong><em>What do you think of the values for m and b? Very close to our expected values, right? </em>💁</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*gHQ2bc-0tkEWYi8g_XnMAg.jpeg" /></figure><p>Below is the visualization of how the model is being optimized at each iteration. In the beginning values of m and b are starting at 1.0 (as we specified in our code), but over time they get to the right values. And we are also seeing our loss (prediction — y) decrease to 0 over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TBLHOD0TCDdJKp9XJJA4rw.png" /><figcaption><em>Fig 3. Values of </em><em>m, </em><em>b and </em><em>loss over 100 iterations.</em></figcaption></figure><blockquote>Q. How would you account for a neighborhood in your Home Price Predictor?</blockquote><blockquote>Q. How would you take home images into consideration?</blockquote><p>Hopefully, the above tutorial helped you understand the basics of ML. Soon every full stack engineer will be using ML in their applications. We are not far from npm install object-detect.</p><p><strong>If you would like to discuss more on ML or need help understanding if ML can be applied your problem, feel free to reach out to me. I’m happy to help.</strong></p><p><strong><em>Thanks for reading! Feel free to hit the </em></strong>👏 <strong><em>button below and share if you found this piece interesting!</em></strong></p><p><strong><em>You can connect with me on </em></strong><a href="https://twitter.com/arjoonpatel"><strong><em>Twitter</em></strong></a><strong><em> or </em></strong><a href="https://www.linkedin.com/in/arjunpatel/"><strong><em>LinkedIn</em></strong></a><strong><em>.</em></strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4112c405f9a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/getting-started-with-machine-learning-in-15-lines-of-code-4112c405f9a4">Getting started with Machine Learning in 5 minutes</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>