<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/introduction-to-machine-learning-for-non-developers/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://blog.datascienceheroes.com/introduction-to-machine-learning-for-non-developers/"> R - Data Science Heroes Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<h2>About Machine Learning</h2>
<p><img alt="Introduction to Machine Learning for non-developers" src="https://i1.wp.com/blog.datascienceheroes.com/content/images/2018/05/random_forest.png?w=456" data-recalc-dims="1"></p>
<p>We all know that machine learning is about handling data, but it also can be seen as:</p>
<blockquote>
<p>The art of finding order in data by browsing its inner information.</p>
</blockquote>
<h3>Some background on predictive models</h3>
<p>There are several types of predictive models. These models usually have several input columns and one target or outcome column, which is the variable to be predicted.</p>
<p><img alt="Introduction to Machine Learning for non-developers" src="https://i2.wp.com/cdn.auth0.com/blog/machine-learning-1/predictive_model_table.png?w=400&ssl=1" data-recalc-dims="1"></p>
<p>So basically, a <strong>model performs mapping between inputs and an output</strong>, finding-mysteriously, sometimes-the relationships between the input variables in order to predict any other variable.</p>
<p>As you may notice, it has some commonalities with a human being who <code>reads the environment => processes the information => and performs a certain action</code>.</p>
<h2>So what is this post about?</h2>
<p>It’s about becoming familiar with one of the most-used predictive models: <strong>Random Forest</strong> (<a rel="nofollow" href="https://www.stat.berkeley.edu/~breiman/RandomForests/cc_home.htm" target="_blank">official algorithm site</a>), <a rel="nofollow" href="https://cran.r-project.org/web/packages/randomForest/randomForest.pdf" target="_blank">implemented in R</a>, one of the most-used models due to its simplicity in tuning and robustness across many different types of data.</p>
<p>If you’ve never done a predictive model before and you want to, this may be a good starting point <img alt="😉" src="https://s.w.org/images/core/emoji/2.4/72x72/1f609.png" class="wp-smiley"></p>
<h3>Don’t get lost in the forest!</h3>
<p><img alt="Introduction to Machine Learning for non-developers" src="https://i2.wp.com/cdn.auth0.com/blog/machine-learning-1/random_forest_bear.png?w=300&ssl=1" data-recalc-dims="1"></p>
<p>The basic idea behind it is to build hundreds or even thousands of <strong>simple and less-robust models</strong> (aka <a rel="nofollow" href="https://en.wikipedia.org/wiki/Decision_tree_learning" target="_blank">decision trees</a>) in order to have a less-biased model.</p>
<p><strong>But how?</strong></p>
<p>Every ‘tiny’ branch of these decision tree models will see just part of the whole data to produce their humble predictions. So the final decision produced by the random forest model is the result of <strong>voting by all the decision trees</strong>. Just like democracy.</p>
<p><strong>And what is a decision tree?</strong></p>
<p>You’re already familiar with <strong>decision tree</strong> outputs: they produce <code>IF-THEN</code> rules, such as, <code>If the user has more than five visits, he or she will probably use the app</code>.</p>
<p><img alt="Introduction to Machine Learning for non-developers" src="https://i2.wp.com/cdn.auth0.com/blog/machine-learning-for-everyone/decision-tree.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h3>Putting all together…</h3>
<p>If a random forest has <code>three trees</code> (but normally 500-plus) and a <strong>new customer arrives</strong>, then the prediction whether said customer will buy a certain product will be ‘yes’ if ‘two trees’ predict ‘yes’.</p>
<p><img alt="Introduction to Machine Learning for non-developers" src="https://i0.wp.com/cdn.auth0.com/blog/machine-learning-1/random_forest.png?w=456&ssl=1" data-recalc-dims="1"></p>
<blockquote>
<p>Having hundreds of opinions –<em>decision trees</em>– tends to produce a more accurate result on average –<em>random forest</em>-.</p>
</blockquote>
<p><em>But don’t panic, all of the above is encapsulated to the data scientist.</em></p>
<p>With this model, you will not be able to easily know <em>how</em> the model comes to assign a high or low probability to each input case. It acts more like a black box, similar to what is used for <strong>deep learning</strong> with neural networks, where every neuron contributes to the whole.</p>
<p>You can practice with these two friendly random forest tutorials using R from <a rel="nofollow" href="http://www.blopig.com/blog/2017/04/a-very-basic-introduction-to-random-forests-using-r/" target="_blank">blopig.com</a> and <a rel="nofollow" href="https://datascienceplus.com/random-forests-in-r/" target="_blank">datascienceplus.com</a>.</p>
<p></p>
<h2>What language is convenient for learning machine learning?</h2>
<p>If you want to develop your own data science projects, you could start with <strong>R</strong>. It has a <strong>enormous community</strong> from which you can learn (and teach). It’s not always just a matter of complex algorithms, but also about having support when things don’t go as expected. </p>
<p>And this occurs <strong>often</strong> when you’re doing new things.</p>
<p><img alt="Introduction to Machine Learning for non-developers" src="https://i1.wp.com/cdn.auth0.com/blog/machine-learning-1/R_logo.png?w=250&ssl=1" data-recalc-dims="1"></p>
<h3>Finally, some numbers about community support</h3>
<p>Despite the fact that R (and <code>Python</code> with <code>pandas</code> and <code>numpy</code>) has lots of packages, libraries, free books, and free courses, check these metrics: There are more than <strong>236,000</strong> questions in <a rel="nofollow" href="http://stackoverflow.com/questions/tagged/r" target="_blank">stackoverflow.com</a>, and another <strong>~18,000</strong> in <a rel="nofollow" href="http://stats.stackexchange.com/questions/tagged/r" target="_blank">stats.stackexchange.com</a> are tagged with <strong>R</strong> (as of May 2018).</p>
<h4>The R community grew a lot!</h4>
<p>By the time I posted this at <a rel="nofollow" href="https://auth0.com/" target="_blank">https://auth0.com</a> (Dec 2016), there were 160,000 questions at stackoverflow. </p>
<p>Now the 236,000 questions represents an <strong>increasing of 47%</strong> in just a one and a half years! <img alt="🎉" src="https://s.w.org/images/core/emoji/2.4/72x72/1f389.png" class="wp-smiley"></p>
<p>Definitely R community rocks. </p>
<p>That’s all by now, thanks! <img alt="🙂" src="https://s.w.org/images/core/emoji/2.4/72x72/1f642.png" class="wp-smiley"></p>
<p>—</p>
<p>You can contact me at: <a rel="nofollow" href="https://blog.datascienceheroes.com/introduction-to-machine-learning-for-non-developers/twitter.com/pabloc_ds" target="_blank"> Twitter</a> | <a rel="nofollow" href="https://www.linkedin.com/in/pcasas" target="_blank">LinkedIn</a></p>
<hr>
<p><img alt="👉" src="https://s.w.org/images/core/emoji/2.4/72x72/1f449.png" class="wp-smiley"> Continue reading another non-technical post: <strong><a rel="nofollow" href="https://medium.com/@pcasas.biz/i-hate-math-part-1-4e793f5a8f72" target="_blank">I hate math!</a></strong></p>
<p>Education, “meaning” in what we learn and artificial intelligence in one post.</p>
<p><img alt="Introduction to Machine Learning for non-developers" src="https://i0.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/cat_math.png?w=250&ssl=1" data-recalc-dims="1"></p>
<p><em>PS: Ponies and orcs were included.</em></p>
<hr>
<h4>Learning Data Science</h4>
<p><img alt="📌" src="https://s.w.org/images/core/emoji/2.4/72x72/1f4cc.png" class="wp-smiley"> Continue boosting your knowledge using R examples, images from philosophy and “Back to the Future” movie:</p>
<p><img alt="Introduction to Machine Learning for non-developers" src="https://i1.wp.com/s3.amazonaws.com/datascienceheroes.com/img/herac_back_to_the_future_logo.png?w=400&ssl=1" data-recalc-dims="1"></p>
<p><img alt="👉" src="https://s.w.org/images/core/emoji/2.4/72x72/1f449.png" class="wp-smiley"><strong><a rel="nofollow" href="https://livebook.datascienceheroes.com/" target="_blank">Data Science Live Book</a></strong> <img alt="📗" src="https://s.w.org/images/core/emoji/2.4/72x72/1f4d7.png" class="wp-smiley"> </p>
<p>An open source book, content 100% available to the <img alt="🌎" src="https://s.w.org/images/core/emoji/2.4/72x72/1f30e.png" class="wp-smiley">.</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://blog.datascienceheroes.com/introduction-to-machine-learning-for-non-developers/"> R - Data Science Heroes Blog</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/gw_ChAWrJZg" height="1"></a></div>