<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/automl-package-part-1-2-why-and-how/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://r-posts.com/automl-package-part-1-2-why-and-how/"> R-posts.com</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<h1>Why &amp; how automl package</h1>
<ul>automl package provides:
<li>Deep Learning last tricks (those who have taken Andrew NG’s MOOC on Coursera will be in familiar territory)</li>
<li>hyperparameters autotune with metaheuristic (PSO)</li>
<li>experimental stuff and more to come (you’re welcome as coauthor!)</li>
</ul>
<h2>Deep Learning existing frameworks, disadvantages</h2>
<p>
Deploying and maintaining most Deep Learning frameworks means: Python…<br>
R language is so simple to install and maintain in production environments that it is obvious to use a pure R based package for deep learning !</p>
<h2>Neural Network – Deep Learning, disadvantages</h2>
<p></p>
<ul>Disadvantages:
<li>1st disadvantage: you have to test manually different combinations of parameters (number of layers, nodes, activation function, etc …) and then also tune manually hyper parameters for training (learning rate, momentum, mini batch size, etc …)</li>
<li>2nd disadvantage: only for those who are not mathematicians, calculating derivative in case of new cost or activation function, may by an issue.</li>
</ul>
<p><img data-orig-file="https://i0.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc001.png?fit=542%2C296&amp;ssl=1" data-orig-size="542,296" data-medium-file="https://i0.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc001.png?fit=450%2C246&amp;ssl=1" data-attachment-id="686" data-image-meta="{" data-image-description="" src="https://i0.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc001.png?resize=450%2C246" data-permalink="https://r-posts.com/automl-package-part-1-2-why-and-how/imgperc001/" data-large-file="https://i0.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc001.png?fit=450%2C246&amp;ssl=1" alt="" data-image-title="imgperc001" sizes="(max-width: 450px) 100vw, 450px" width="450" data-comments-opened="1" class="wp-image-686" data-recalc-dims="1" height="246"></p>
<h2>Metaheuristic – PSO, benefits</h2>
<p></p>
<p>The Particle Swarm Optimization algorithm is a great and simple one.<br>
In a few words, the first step consists in throwing randomly a set of particles in a space and the next steps consist in discovering the best solution while converging.</p>
<p><img data-orig-file="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc002.png?fit=544%2C298&amp;ssl=1" data-orig-size="544,298" data-medium-file="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc002.png?fit=450%2C247&amp;ssl=1" data-attachment-id="687" data-image-meta="{" data-image-description="" src="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc002.png?resize=450%2C247" data-permalink="https://r-posts.com/automl-package-part-1-2-why-and-how/imgperc002/" data-large-file="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc002.png?fit=450%2C247&amp;ssl=1" alt="" data-image-title="imgperc002" sizes="(max-width: 450px) 100vw, 450px" width="450" data-comments-opened="1" class="wp-image-687" data-recalc-dims="1" height="247"><br>
video tutorial from Yarpiz is a great ressource</p>
<h2>Birth of automl package</h2>
<p></p>
<p>automl package was born from the idea to use metaheuristic PSO to address the identified disadvantages above.<br>
And last but not the least reason: use R and R only <img alt="🙂" src="https://i1.wp.com/s.w.org/images/core/emoji/11/72x72/1f642.png?w=456&ssl=1" class="wp-smiley" data-recalc-dims="1"></p>
<ul>3 functions are available:
<li>automl train manual: the manual mode to train a model</li>
<li>automl train: the automatic mode to train model</li>
<li>automl predict: the prediction function to apply a trained model on datas</li>
</ul>
<h2>Mix 1: hyperparameters tuning with PSO</h2>
<p></p>
<p>Mix 1 consists in using PSO algorithm to optimize the hyperparameters: each particle corresponds to a set of hyperparameters.<br>
The automl train function was made to do that.</p>
<p><img data-orig-file="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc003.png?fit=541%2C296&amp;ssl=1" data-orig-size="541,296" data-medium-file="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc003.png?fit=450%2C246&amp;ssl=1" data-attachment-id="688" data-image-meta="{" data-image-description="" src="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc003.png?resize=450%2C246" data-permalink="https://r-posts.com/automl-package-part-1-2-why-and-how/imgperc003/" data-large-file="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc003.png?fit=450%2C246&amp;ssl=1" alt="" data-image-title="imgperc003" sizes="(max-width: 450px) 100vw, 450px" width="450" data-comments-opened="1" class="wp-image-688" data-recalc-dims="1" height="246"><br>
nb: parameters (nodes number, activation functions, etc…) are not automatically tuned for the moment, but why not in the futur</p>
<h2>Mix 2: PSO instead of gradient descent</h2>
<p></p>
<p>Mix 2 is experimental, it consists in using PSO algorithm to optimize the weights of Neural Network in place of gradient descent: each particle corresponds to a set of neural network weights matrices.<br>
The automl train manual function do that too.</p>
<p><img data-orig-file="https://i2.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc004.png?fit=542%2C296&amp;ssl=1" data-orig-size="542,296" data-medium-file="https://i2.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc004.png?fit=450%2C246&amp;ssl=1" data-attachment-id="689" data-image-meta="{" data-image-description="" src="https://i2.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc004.png?resize=450%2C246" data-permalink="https://r-posts.com/automl-package-part-1-2-why-and-how/imgperc004/" data-large-file="https://i2.wp.com/r-posts.com/wp-content/uploads/2018/10/imgperc004.png?fit=450%2C246&amp;ssl=1" alt="" data-image-title="imgperc004" sizes="(max-width: 450px) 100vw, 450px" width="450" data-comments-opened="1" class="wp-image-689" data-recalc-dims="1" height="246"></p>
<h2>Next post</h2>
<p></p>
<p>We will see how to use it in the next post.</p>
<p>Feel free to comment or join the team being formed</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://r-posts.com/automl-package-part-1-2-why-and-how/"> R-posts.com</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 alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/KgbRP9p-BOA" height="1"></a></div>