Uncategorized

Machine Learning Concepts for Beginners

Let’s face it – EVERYONE wants to know about Machine Learning. Considering the immense job-creating, life-revolutionising potential that it has, it is no surprise that it is in such high demand now. There are so many articles, videos, and books everywhere!

The amount of online content is truly spectacular, but for a beginner, it can be quite intimidating. It’s almost like being given a plethora of cuisines, and then being instructed to review them all. Where would you start? How would you consume all of it? How much of each would you need to have until you can come up with an accurate review?

When I was just getting acquainted with Machine Learning, I faced this exact problem. There was just too much shared knowledge everywhere. Sometimes, I delayed my learning just because I had no idea where to begin.

To be honest, even now, I feel a little hesitant to look up new information, because I know that I’d be spending most of my days just deciding what to learn and from where.

Thus, I decided to consolidate all the information I could gather on Machine Learning basics into one easy to understand article, for other beginners who may be struggling like I did. I’m sure after reading this, you will feel a little more confident in your knowledge of Machine Learning.

I figured I would divide the concepts into separate parts that could answer the following five questions – “What”, “Why”, “When”, “Where”, and “How”. That way, it’ll be easier to understand Machine Learning in an easy step-by-step manner.

Well, without wasting any more time, let’s begin!

The What, Why, When, Where, and How of Machine Learning

WHAT?

Machine Learning is the process by which a machine learns how to think like a human being in order to perform a specific task, without being explicitly programmed.  

WHY?

By training a machine to think like a human being, the execution of certain tasks becomes easier, quicker, and much more efficient.

WHEN?

Machine Learning was invented by some very ambitious people who desired to develop an intelligence that could resemble, if not surpass, natural human intelligence. The term ‘Machine Learning’ was coined by Arthur Samuel in the 1950s. This was a time when Alan Turing proposed the ‘Learning Machine’, and Marvin Minsky and Dean Edmonds built the first Neural Network machine. Within that same decade, Arthur Samuel invented a Checkers playing machine, and Frank Rosenblatt developed the very first Perceptron. From there, Machine Learning steadily began to grow.

WHERE?

Machine Learning has come so far, from playing games to recommending products to customers. The more the technology advanced, the better its applicability became. Listed below are five important applications of Machine Learning that are commonly used, easy to remember, and good to know –

  1. Spam Filter: Spam emails can automatically be detected within your inbox and stored in your Spam folder. That way, it doesn’t interfere with your more important emails. It also reduces the amount of time and effort you would have to spend sorting out your inbox.
  2. Recommendation Systems: Most online stores use Machine Learning to recommend items based on the user’s recent activity and requirements. This prevents customers from getting irrelevant suggestions, and increases the chances of them making a purchase.
  3. Virtual Assistants: They assist users in their daily requirements like setting alarms, making lists, and so on. They then store data from previous tasks, and tailor their performance based on these preferences.
  4. Search Engines: Search Engines use Machine Learning Algorithms to find and display results that are most accurate to a user’s search. They even filter them out based on the user’s past activity.
  5. GPS: Travelling has become so much easier thanks to GPS apps. These systems use Machine Learning to make travelling less difficult. They can show people their current location, the distance between two places, the estimated time it would take to reach another location, and the amount of traffic that could either increase or decrease their time of arrival.

How?

Now that we know some of the important facts of Machine Learning, we shall proceed to the more interesting part – Understanding how Machine Learning works.

The first thing to know is that Machine Learning is mainly of two types:

  1. Supervised Learning: It involves the use of labelled data (where the number of classes are known).
  2. Unsupervised Learning: It involves the use of unlabelled data (where the number of classes are unknown).

Let’s have a look at five differences between Supervised Learning and Unsupervised Learning as shown below:

a list of the differences between supervised and unsupervised machine learning
As seen on the AI For Women Instagram Page: https://www.instagram.com/aiforwomenofficial/

Now, there is a third type, known as Reinforcement Learning. It is a little different from its other two siblings, as it doesn’t really depend on the presence or absence of labels. This type of Machine Learning is similar to training a Puppy to do tricks – When the Puppy does the trick right, we give it a treat. In the same way, if the Machine gives a correct output, we give it a positive signal (reinforcing), while if it gives an incorrect output, we give it a negative signal. Thus, the machine eventually learns to perform its task correctly, with fewer wrong outcomes.

Let’s go back to the first two types of Machine Learning. They are further divided into their own methods. Supervised Learning involves Regression and Classification, while Unsupervised Learning involves Clustering and Association.

Regression: It is used to find values for Continuous variables. For example – Predicting the price of a stock, a Consumer’s spending behaviour, and so on.

Classification: It is used to find values for Discrete variables. It can be used for Binary Classification (Example – Determining if a picture is that of a Cat or Dog) or Multi-Class Classification (Example – Determining if a picture is that of a Cat, Dog, Mouse, Squirrel, or Kangaroo).

Clustering: It is used to classify data, but without any prior knowledge of the number of classes or the labels of each class. It finds similarities between the data all on its own, and groups similar data together as a possible class. Most real world data is unlabelled and would thus require Clustering. For example – Finding out how many different types of flowers are in a dataset of images.

Association: It is used to find associations or relationships among items within a data set. For example – If a Customer buys a Phone and Phone Cover, they would most likely also want to buy a screen guard and a charger to go with it.

Let us now have a look at the different Algorithms in Machine Learning, which are important when it comes to the practical implementations. I will go into the details of these Machine Learning algorithms in another Article. For now, we will skim through them, just so that you are at least aware of all these terms.

Types of Supervised Machine Learning Algorithms –

  • Linear Regression
  • Support Vector Machines (SVM)
  • Neural Networks
  • Decision Trees
  • Naive Bayes
  • Nearest Neighbour

Types of Unsupervised Machine Learning Algorithms – 

  • k-means clustering
  • Association rule
  • Principal component analysis

Types of Reinforcement Learning –

  • Q-Learning
  • Deep Adversarial Networks

We now know the different methods and algorithms involved in Machine Learning. The question is, how do we put all this into practice? What do we need to do first?

To help you out, here is a brief step-wise procedure that you can follow to solve any Machine Learning problem that may come your way.

Steps Involved in Solving a Machine Learning Problem  

When a Machine Learning problem is placed in front of you, it might look quite intimidating at first, and you may even feel a little lost. However, there is no need to panic. Just remain calm and follow these steps:

  1. Understand the Problem.
    The first thing you need to do is understand the problem. Make sure you know what needs to be done. Pay attention to any specifications or factors that might be important (for example, if you need information regarding school children, you can’t go to an office and expect to gather the right data from there).
  2. Collect the Data.
    Data plays an extremely important role in Machine Learning. Without the right kind of data, it is almost impossible to expect any kind of accurate outcome. Hence, you must choose the right source from which you would like to collect your data. Then, go ahead and gather all the data you require.
  3. Prepare the Data.
    You now need to prepare your data for analysis. This could involve cleaning it up, making a few minor but necessary changes, etc. For example, to predict the sales of a product by studying its demand over a period of 6 months, the names of the buyers will not have any affect on your analysis, so you can remove it from your data. Likewise, you might need to manipulate the rest of the dataset. Visualising data is a very helpful technique to understand the dataset with the help of graphs.
  4. Define the Training and Test Data.
    Training and Test Data do exactly what their names suggest. Training Data is used to train the model, which means this data is passed through the model to help it learn. Test data is used to test the model, which means this data is used to verify the model’s accuracy. It’s similar to a child learning a subject and then writing an exam to see how well he understood that subject.
  5. Choose the Model.
    You need to choose a Machine Learning Model that will help you to obtain the best outcome. This is done based on your problem, your desired output, your data quality, and so on.
  6. Train the Model.
    You can now input the necessary parameters and hyperparameters into your Machine Learning model. This includes values like the weights and bias (the learnable parameters of the model), and the number of epochs (the number of times the data must pass through the model).
  7. Run the Model on the Test Data.
    This is done to check the accuracy of your model. The higher the accuracy, the better the model. (NOTE: Higher accuracy is better, but a 100% accuracy is not the best result. It could mean that the Machine has just memorised the correct values. This is caused due to overfitting).
  8. Evaluate the Data.
    While the model is training, you will need to evaluate its performance with some previously unseen data. You may need to tune (change) the parameters to get better results after the evaluation. Repeat steps 7 and 8 until you get a satisfactory outcome.
  9. Test the Data.
    Once you have finished training and evaluating the Machine, you can use your model on the Test Data to see how well the machine has learned. This step is used as final check and ensure that the model is fully trained with an acceptable accuracy, and without any additional drawbacks or hindrances.

This just about wraps up the basics of Machine Learning. Once you are confident of your fundamentals, you can move on to higher level tasks, like developing Machine Learning models for real world implementation.

Don’t hesitate to learn new things, practise what you know, and make a couple of mistakes here and there. These are all just a part of the entire Machine Learning journey. If you work hard enough and stay focused, you will soon become an expert in Machine Learning!

If you like what you read, check out this article:

Data Science, Artificial Intelligence, Machine Learning, Deep Learning – A Cheat Sheet

Leave a Reply

Your email address will not be published. Required fields are marked *

Welcome to AI For Women

wpChatIcon