<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/the-mathematics-of-machine-learning/"></div></div><div><a data-url="http://www.r-bloggers.com/the-mathematics-of-machine-learning/" data-counturl="http://www.r-bloggers.com/the-mathematics-of-machine-learning/" data-count="horizontal" data-text="The Mathematics of Machine Learning" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://datascience-africa.org/2016/07/mathematics-machine-learning/"> R – Data Science Africa</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><em>This post was first published on my <a target="_blank" href="https://www.linkedin.com/pulse/mathematics-machine-learning-wale-akinfaderin?trk=pulse_spock-articles">Linkedin</a> page and posted here as a contributed post.</em></p>
<p>In the last few months, I have had several people contact me about their enthusiasm for venturing into the world of data science and using Machine Learning (ML) techniques to probe statistical regularities and build impeccable data-driven products. However, I’ve observed that some actually lack the necessary mathematical intuition and framework to get useful results. This is the main reason I decided to write this blog post. Recently, there has been an upsurge in the availability of many easy-to-use machine and deep learning packages such as <a target="_blank" rel="nofollow" href="http://scikit-learn.org/stable/">scikit-learn</a>, <a target="_blank" rel="nofollow" href="http://www.cs.waikato.ac.nz/ml/weka/">Weka</a>, <a target="_blank" rel="nofollow" href="https://www.tensorflow.org/">Tensorflow</a> etc. Machine Learning theory is a field that intersects statistical, probabilistic, computer science and algorithmic aspects arising from learning iteratively from data and finding hidden insights which can be used to build intelligent applications. Despite the immense possibilities of Machine and Deep Learning, a thorough mathematical understanding of many of these techniques is necessary for a good grasp of the inner workings of the algorithms and getting good results.</p>
<p><span><strong>Why Worry About The Maths?</strong></span></p>
<p>There are many reasons why the mathematics of Machine Learning is important and I’ll highlight some of them below:</p>
<p>1. Selecting the right algorithm which includes giving  considerations to accuracy, training time, model complexity, number of parameters and number of features.</p>
<p>2. Choosing parameter settings and validation strategies.</p>
<p>3. Identifying underfitting and overfitting by understanding the Bias-Variance tradeoff.</p>
<p>4. Estimating the right confidence interval and uncertainty.</p>
<p><span><strong>What Level of Maths Do You Need?</strong></span></p>
<p>The main question when trying to understand an interdisciplinary field such as Machine Learning is the amount of maths necessary and the level of maths needed to understand these techniques. The answer to this question is multidimensional and depends on the level and interest of the individual. Research in mathematical formulations and theoretical advancement of Machine Learning is ongoing and some researchers are working on more advance techniques. I’ll state what I believe to be the minimum level of mathematics needed to be a Machine Learning Scientist/Engineer and the importance of each mathematical concept.</p>
<p><img src="http://i0.wp.com/media.licdn.com/mpr/mpr/shrinknp_800_800/AAEAAQAAAAAAAAkvAAAAJDE4ZDhmNzlmLTdjNjgtNGEwZC05N2QyLWMzYjU0ZTQ5NGY2ZQ.png?resize=456%2C348&ssl=1" data-recalc-dims="1"></p>
<p>1. <span>Linear </span><span>Algebra:</span> Someone recently said that “Linear Algebra is the mathematics of the 21st century” and I totally agree with the statement. In ML, Linear Algebra comes up everywhere. Topics such as Principal Component Analysis (PCA), Singular Value Decomposition (SVD), Eigendecomposition of a matrix, LU Decomposition, QR Decomposition/Factorization, Symmetric Matrices, Orthogonalization &amp; Orthonormalization, Matrix Operations, Projections, Eigenvalues &amp; Eigenvectors, Vector Spaces and Norms are needed for understanding the optimization methods used for machine learning. The amazing thing about Linear Algebra is that there are so many online resources. I have always said that the traditional classroom is dying because of the vast amount of resources available on the internet. My favorite Linear Algebra course is the one offered by <a target="_blank" rel="nofollow" href="http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/">MIT Courseware</a> (Prof. Gilbert Strang).</p>
<p>2. <span>Probability Theory and Statistics:</span> Machine Learning and Statistics aren’t very different fields. Actually, someone recently defined Machine Learning as ‘doing statistics on a Mac’. Some of the fundamental Statistical and Probability Theory needed for ML are Combinatorics, Probability Rules &amp; Axioms, Bayes’ Theorem, Random Variables, Variance and Expectation, Conditional and Joint Distributions, Standard Distributions (Bernoulli, Binomial, Multinomial, Uniform and Gaussian), Moment Generating Functions, Maximum Likelihood Estimation (MLE), Prior and Posterior, Maximum a Posteriori Estimation (MAP) and Sampling Methods.</p>
<p>3. <span>Multivariate Calculus:</span> Some of the necessary topics include Differential and Integral Calculus, Partial Derivatives, Vector-Values Functions, Directional Gradient, Hessian, Jacobian, Laplacian and Lagragian Distribution.</p>
<p>4. <span>Algorithms and Complex Optimizations:</span> This is important for understanding the computational efficiency and scalability of our Machine Learning Algorithm and for exploiting sparsity in our datasets. Knowledge of data structures (Binary Trees, Hashing, Heap, Stack etc), Dynamic Programming, Randomized &amp; Sublinear Algorithm, Graphs, Gradient/Stochastic Descents and Primal-Dual methods are needed.</p>
<p>5. <span>Others:</span> This comprises of other Math topics not covered in the four major areas described above. They include Real and Complex Analysis (Sets and Sequences, Topology, Metric Spaces, Single-Valued and Continuous Functions, Limits), Information Theory (Entropy, Information Gain), Function Spaces and Manifolds.</p>
<p>Some online MOOCs and materials for studying some of the Mathematics topics needed for Machine Learning are:</p>
<ul>
<li>Khan Academy’s <a target="_blank" rel="nofollow" href="https://www.khanacademy.org/math/linear-algebra">Linear Algebra</a>, <a target="_blank" rel="nofollow" href="https://www.khanacademy.org/math/probability">Probability &amp; Statistics</a>, <a target="_blank" rel="nofollow" href="https://www.khanacademy.org/math/calculus-home/multivariable-calculus">Multivariable Calculus</a>and <a target="_blank" rel="nofollow" href="https://www.khanacademy.org/math/differential-calculus/derivative-applications/calc-optimization/e/optimization">Optimization</a>.</li>
<li><a target="_blank" rel="nofollow" href="https://www.coursera.org/course/matrix">Coding the Matrix: Linear Algebra through Computer Science Applications</a> by Philip Klein, Brown University.</li>
<li><a target="_blank" rel="nofollow" href="https://www.edx.org/course/utaustinx/utaustinx-ut-5-01x-linear-algebra-1162">Linear Algebra – Foundations to Frontiers</a> by Robert van de Geijn, University of Texas.</li>
<li><a target="_blank" rel="nofollow" href="https://www.edx.org/course/applications-linear-algebra-part-1-davidsonx-d003x-1">Applications of Linear Algebra, Part 1</a> and <a target="_blank" rel="nofollow" href="https://www.edx.org/course/applications-linear-algebra-part-2-davidsonx-d003x-2">Part 2</a>. A newer course by Tim Chartier, Davidson College.</li>
<li><a target="_blank" rel="nofollow" href="http://projects.iq.harvard.edu/stat110/youtube">Joseph Blitzstein – Harvard Stat 110 lectures</a></li>
<li>Larry Wasserman’s book – <a target="_blank" rel="nofollow" href="http://read.pudn.com/downloads158/ebook/702714/Larry%20Wasserman_ALL%20OF%20Statistics.pdf">All of statistics: A Concise Course in Statistical Inference .</a></li>
<li>Boyd and Vandenberghe’s course on <a target="_blank" rel="nofollow" href="http://stanford.edu/~boyd/cvxbook/">Convex optimisation from Stanford</a>.</li>
<li><a target="_blank" rel="nofollow" href="https://www.edx.org/course/linear-algebra-foundations-frontiers-utaustinx-ut-5-04x">Linear Algebra – Foundations to Frontiers</a> on edX.</li>
<li>Udacity’s <a target="_blank" rel="nofollow" href="https://www.udacity.com/course/intro-to-statistics--st101">Introduction to Statistics</a>.</li>
</ul>
<p>Finally, the main aim of this blog post is to give a well-intentioned advice about the importance of Mathematics in Machine Learning and the necessary topics and useful resources for a mastery of these topics. However, some Machine Learning enthusiasts are novice in Maths and will probably find this post disheartening (seriously, this is not my aim). For beginners, you don’t need a lot of Mathematics to start doing Machine Learning. The fundamental prerequisite is data analysis as described in this <a target="_blank" rel="nofollow" href="http://www.r-bloggers.com/the-real-prerequisite-for-machine-learning-isnt-math-its-data-analysis/">blog post</a>and you can learn the maths on the go as you master more techniques and algorithms.</p>
<p>The post <a target="_blank" rel="nofollow" href="http://datascience-africa.org/2016/07/mathematics-machine-learning/">The Mathematics of Machine Learning</a> appeared first on <a target="_blank" rel="nofollow" href="http://datascience-africa.org/">Data Science Africa</a>.</p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/the-mathematics-of-machine-learning/"></div></div><div><a data-url="http://www.r-bloggers.com/the-mathematics-of-machine-learning/" data-counturl="http://www.r-bloggers.com/the-mathematics-of-machine-learning/" data-count="vertical" data-text="The Mathematics of Machine Learning" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://datascience-africa.org/2016/07/mathematics-machine-learning/"> R – Data Science Africa</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/iIiPe6o10Ss"></a></div>