Machine Learning Algorithms

Feb 01, 2019

Upon completion of this video, you will be able to recognize the different kinds of machine learning algorithms, such as regression, classification, and clustering, as well as their specific applications.

In this course, I will introduce you to the concept of machine learning. We will take a look at a number of different machine learning algorithms. And understand exactly the kinds of problems they are meant to solve. We start of by taking a look at the list of the various types of machine learning algorithms.

One of the most fundamental problems solved by machine learning is classification. That is to find out what category a particular data point belongs to. Another basic problem is that of regression, where we need to predict a continuous value such as a price. Classification and regression are examples of supervised learning, where there is a training phase involved. This is where the algorithm will be fed in a number of inputs along with the correct outputs.

And it is a job of the algorithm to determine a function which will map the relationship between the input and the output. There are also recommendation algorithms in machine learning where a recommendation is made based on past activity. Another problem solved by machine learning is that of dimensionality reduction. If you have multiple factors which seem to influence an outcome. And from those you want to identify which of the factors has the most bearing on the result. Well, dimensionality reduction is what you will apply.

Clustering is another commonly used machine learning technique. And this is applied where you have a lot of data but you are trying to look for patterns within them. In order to get an understanding of what the data represents. Well clustering will allow you to break up your data into clusters. And within each of those clusters, you can look for some kind of commonalities.

And one more type of machine learning algorithm is reinforcement learning. This is a technique which is applied when an agent is dropped into an unknown environment. There are certain actions which are followed by consequences. And there are some consequences which will result in a reward, and others, in a punishment. The aim of the agent is to maximize rewards or to minimize punishment. For all of these types of machine learning algorithms, there are various implementations which are available.

And for most machine learning developers, the task is to understand exactly what the strength and weaknesses are for each of the techniques. And then apply the correct one to the data which they have. A developer will also need to understand the various ways in which each of these algorithms can be tweaked in order to get the best results.

We will now examine some of these machine learning algorithm types in a little more detail. Including the specific types of problems they can solve starting with classification. One common application for classification algorithms is spam detection. When an email is sent to you, your email service will try to determine whether that email represents a real, genuine email, or ham. Or whether it is spam. There may be certain types of patterns which it may glean. For example, if the email comes from some unknown email address, or contains a lot of exclamation points. Then it is likely that this will be regarded as spam.

On the other hand, if the email is personally addressed to you and the language is simple and clear. Well in this case, it should be treated as a genuine email and directed to your inbox rather than the spam folder. Such distinctions can be made by classification algorithms where they will classify your emails as spam or ham. And these algorithms can also be applied to other classification problems. Another common problem solved by machine learning is regression. And this is when the problem which you need to solve is to predict a value which is continuous in nature.

[Video description begins] Screen Title: Housing Prices: Predict Based on Attributes. [Video description ends]

For example, based on some data inputs, you need to predict what the price is for a house. For example, one of your data inputs might be the number of rooms in the house. And your machine learning algorithm may have learned a pattern where the greater the number of rooms in the house, the more expensive it is. In addition, if one of the other input factors in your data happens to be some kind of rating for the public schools in a particular district. Well, your regression algorithm may use that as well. And then based on the grade of the public schools, it may predict a higher price for a house in that same district.

[Video description begins] Houses in a good school district are more expensive. [Video description ends]

One more variety of machine learning algorithms, make recommendations based on past history. So this is something you may have had some exposure to if you are a frequent user of e-commerce sites.

[Video description begins] Screen Title: Recommendation Systems. [Video description ends]

For example, if you have made purchases of a particular type in the past. Then a recommendation engine will scan through each of those past purchases. Detect some kind of patterns in them, and then based on that, make recommendations for other products which you may like.

[Video description begins] A diagram displays. It shows Users and Products on the left-hand side. Both, Users and Products, are connected to a Recommendation engine using two separate dotted lines. The Recommendation engine is further connected to the text People who buy X also buy Y using two separate dotted lines. [Video description ends]

There are also machine learning algorithms devoted to the task of dimensionality reduction.

[Video description begins] Screen Title: Compact Representations of Data. [Video description ends]

Very often when you get data from some source, there may be a number of different factors which seem to influence a particular outcome. For example, there may be a particular stock price which is affected by a number of different factors. This could range from the weather to the health of the overall economy, and also to the performance of stocks in a particular sector. When there are a lot of different factors which seem to be influencing the price of a stock. And you need to determine which of these actually has the most impact on the stock price. Well, then you may need to perform latent factor analysis.

[Video description begins] Latent factor analysis finds the most significant driver of stock prices. [Video description ends]

So this includes the technique of dimensionality reductions. In order for you to understand which of the factors in your data actually has the most impact on the stock price. These are especially useful when you may have a number of different factors in your data which happen to be correlated. And there is no cause and effect relationship between them and the outcome. There will also be occasions where you have a large dataset in front of you but it is not obvious whether there are any patterns within them. In this case, it may make sense to break up your data into various groups where each of the groups have some things in common. And this is precisely what clustering algorithms help you accomplish.

[Video description begins] Screen Title: Logical Groupings of Data. [Video description ends]

For example, consider an e-commerce company which has data about all of its users as well as their past purchases. The company may be interested in dividing their users into a number of logical groups. So that these groups can be targeted with customized marketing techniques. In such a case, the company might make use of a clustering algorithm.

And they may learn that the users in one of the clusters happen to be sports lovers. These users can then be targeted with marketing campaigns which involves the use of sports and sports personalities. And they can be recommended products which do have some connection with sports. Similarly, a clustering algorithm may find users in one cluster who happen to be music lovers. And a separate music team marketing campaign may be used with them. And after clustering algorithms, there is a technique of reinforcement learning where a carrot and stick approach is adopted with an agent.

[Video description begins] Screen Title: Train an Agent to Navigate an Unknown Environment. [Video description ends]

So that it learns whether individual actions are correct or not, and then will hopefully use that in order to solve a bigger problem.

[Video description begins] A diagram displays. In this diagram, one agent icon is connected to another using a unidirectional arrow in a linear zigzag fashion. [Video description ends]

One common application of reinforcement learning is with the use of robot vacuum cleaners. The first time such a vacuum cleaner is used in a house, it is entering an unknown environment. And it needs to learn through a system of rewards and punishments how best to clean up the house. Each time this vacuum cleaner picks up dirt, it may be rewarded, and then each time it hits a wall or some furniture, it will be punished.

Once it is configured to maximize rewards and then minimize punishments. It will hopefully learn over a period of time where all the open spaces in your house are and where it is likely to pick up dirt. And with that, through a process of positive and negative reinforcement, your cleaner will learn how best to cleanup your house.