The Math behind Machine Learning

Larawehbe
Larawehbe
Oct 12 · 3 min read

How far is math important when speaking about machine learning?

Many of us start looking at the coding part to improve programming skills.

Machine learning has become a debatable field in the last 5 years, especially after the bomb of ‘Deep Learning’. Within this wide rush towards it, it is important for any beginner in this field to understand the basics of machine learning and its core aspect, the one that is leading it to be here today, and the core that will lead machines to lead the world.

In this article, I will try to cover a simple yet effective part of the math behind machine learning which is the probabilistic view of models using probability simple rules only.

The following image has crossed my way today:

Image for post
Image for post
Probably .. the master of ML.

The five rules of probability. Mainly, all programmers have taken a probability course in their high school or college. As simple as it seems, these simple rules form the most important laws of machine learning.

To make things clear, I will start stating some examples that use these probability rules ( shown in the figure above) and others.

CTC algorithm

CTC ( Connectionist Temporal Classification) is one of the interesting algorithms used in sequence-to-sequence models, that is based on probability laws. For instance, it works as follows:

let x be a letter ( x : letter) , w be a word ( w:word)

The question is: what is the probability of having the letter x in the word w ?

p(x/w) = ?. The answer here determines the next step that the algorithm will take.

Now, to know its importance, check the impact of CTC in the following subdomains of machine learning:

Handwritten text recognition, Voice recognition

The reason behind using ctc in these models is that they rely mainly on the probability on the next step to decide the current one.

Image for post
Image for post
Source

The figure above shows the baseline architecture of the handwritten decoding model. First of all, convolutional layers are used to extract features for the handwritten images. Next, their output is fed to bidirectional lstm layers, simply to save the current feature(letter) to compare it with the next feature(letter). In this case, we say what is the probability of letter x1 knowing that it is followed ( or passed by) letter x2? see? simple probability lows lead to gentle and great models that will take the world into another future!

Finally, after predicting the pattern of letters, they will enter into a decision-making tree, the CTC model is responsible for choosing the correct pattern of the word.

Probability is the science of studying uncertainty. Machine learning is the science of solving uncertainty by making it ‘mostly’ certain.

These two factors make a great combination of togerther.

In conclusion, never underestimate the power of math. It can make miracles.

Analytics Vidhya

Analytics Vidhya is a community of Analytics and Data…

Sign up for Analytics Vidhya News Bytes

By Analytics Vidhya

Latest news from Analytics Vidhya on our Hackathons and some of our best articles! Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Larawehbe

Written by

Larawehbe

Analytics Vidhya

Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com

Larawehbe

Written by

Larawehbe

Analytics Vidhya

Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem https://www.analyticsvidhya.com

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store