Let's Talk About Machine Learning and Traditional Programming



Commonly, when we are browsing the web, usually we see a lot of information related to our searches, likes and preferences, and the most common thing we hear or think about is: That's the Artificial Intelligence recommending content for us. Or something like: This is the Machine Learning Process analyzing and learning from us.

Both approaches are partially right, because most of the websites and applications we use today, have at least 1 Machine Learning Based Algorithm, which usually, uses the data we generate to learn about us. But also, although machine learning is not Artificial Intelligence by itself, the truth is that it is part of this branch of Computer Science, and as one of the many applications of Machine Learning, this "Artificial Intelligence" will recommend things and contents to us. But now, let's grasp the matter here.




What is Machine Learning?



Machine Learning is a sub-field of Artificial Intelligence, focused on creating and implementing algorithms that enable machines to learn from data in order to gain "Knowledge" and earn "Experience" to solve some specific "Tasks".

This "Knowledge" actually is a group of values used to evaluate the incoming data, process it, and produce outputs (predictions).

The "Experience" it's related to the "Knowledge" because it's based on a process that uses a lot of Try and Fail in order to produce the "Knowledge". For short, "Experience" references all predictions and tests performed by the algorithm on the "Training Data" in order to get the "Knowledge".

The "Training Data" it's the dataset used to train our Machine Learning Algorithm and generate a Model that we can use later to make predictions based on some incoming data.

The "Task" is the goal or objective the algorithm it's trying to accomplish. It could be something like predict the price of an item, recommend a product to a user, detect an emotion from a picture, classify an object in an image, etc.

 

Now, let's see some short definitions for Machine Learning:

"Is the field of study that gives computers the ability to learn without being explicitly programmed"

-Arthur Samuel, 1959-


"A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E"

-Tom Mitchell, 1997-



Machine Learning vs Programming

In order to create a Machine Learning Model, we need to write the algorithm someway (coding or using a no-code alternative) that defines all the logic to implement to learn from the data and generate a model to make predictions. But ML programming it's a little different from traditional programming because there is a switch in the approach we take when creating a traditional program algorithm, and when creating a Machine Learning one.



Traditional Programming


In Traditional Programming, we define the logic we want to be applied to incoming data in order to produce an output. For example, let's say we want to create a program that receives a number and produces the square of the number as output. In other words, we supply the Rules and Data to produce Answers.

If we split this process to analyze it and define the logic, we could go as:

1) Read the input number into a variable (a)
2) Multiply the variable (a) by itself and save the result in another variable (b)
3) Show the result variable (b) to the user

As you can see, we define the logic step by step and have full control of the process flow.



Machine Learning Programming

In Machine Learning Programming, we define a generic algorithm structure and depending on the data we supply, it will generate the internal rules to process the input data and produce the output. In other words, we supply Data and Answers to produce a Model (Rules), which then we can use to generalize and make predictions on new data.




In Resume...


While in traditional programming we define a set of rules to be applied to input data to produce an output, in machine learning we use a set of sample data and it's expected output to training a model, which infers the corresponding rules, and then we can use that model to get an output corresponding to the not seen before input data.

Comments

Popular posts from this blog

Artificial Intelligence, Machine Learning and Deep Learning: A Short Analysis

Android Application Development

Machine Learning Fundamentals: Linear Regression