Are you interested in learning everything about Machine Learning? If your answer is yes, then welcome!
You are in the right place! You will learn the basic concepts of Machine Learning, along with its types of algorithms in this section.
Hello and Welcome! First, we will explore the meaning of Machine Learning.
What is ML?
Table of Contents
ToggleAs the name suggests,” Machine Learning“. That means Machines are learning something.
Right?
Machine Learning (ML) trains computers to learn from experience, similar to the way humans learn over time.
ML is a subpart of Artificial Intelligence. Machine Learning learns by using training data or by learning from its own experiences.
ML is the same as a Newborn child. The child learns both by following instructions from parents and through his own experiences.
ML learns from training data, predicts the output. Based on the predicted result, the system makes another prediction to improve accuracy.
I hope you now have a good understanding of the basics of Machine Learning.
For a More Detailed Definition of ML. Read this article: What is Machine Learning? Clear all your doubts easily.
Why ML?
Every day we generate a huge amount of data. We are in a time where data plays a big role in making every decision in our lives.
This information is generated through human actions and computer operations. Every single day, a lot of data is collected and generated.
So, the next genuine question is, what is the use of this huge amount of Data?
Is it garbage?
No!
This large amount of data may contain many useful details. The next concern is: how do we make sense of the massive amount of data available?
And the answer is-
With the help of Machine Learning.
This makes machine learning a popular technology. That’s why more people are starting careers in it.
The future of ML is very bright.
Now that you know what Machine Learning is and why it matters, let’s move on to a few key terms you should be familiar with.
Basic Terms Used in Machine Learning
Before we move into ML working steps, I would like to explain some terms commonly used in machine learning.
1. Model
When we train a machine learning algorithm using data and it becomes able to make predictions, we call it a machine learning model.
2. Training Data
Machine Learning models are trained using sample data called training data.
3. Testing Data
A testing dataset is a separate, new, unknown dataset that is used to check the performance of the trained models on unseen information.
4. Balance the Dataset
Consider a case where you must identify if a patient has heart disease. To do this, you need data that includes both types – patients with heart disease and patients without heart disease.
If the data has more data about “patients with heart disease” and less data about “patients without heart disease”, then it is called an imbalanced dataset.
To get accurate results, it is important to use a balanced dataset. A balanced dataset refers to having an equal amount of data for both classes: “Patient has heart disease“, and “No heart disease”.
From here, one more term comes. That is Bias.
5. Bias
If your dataset is imbalanced, your model will be biased towards the class with more data. If you give more data saying “Patient has heart disease,” the model will likely predict “Patient has heart disease” more often than “No heart disease.”
6. Overfitting
In simple terms, overfitting is like giving too much importance to every small detail in the data, just like eating too much can be harmful to health.
Yes, it’s right.
What happens when you over eat?
You face some digestive problems. Right?
Similarly, when the Model receives extra information, your model also faces issues.
Overfitting is when the model learns extra details from the data that are not useful and may harm its performance on new data.
7. Underfitting
Underfitting is the opposite of Overfitting. That means if you provide less data during training, your model may still face issues.
Now that you understand these terms, let’s move on to the next section: How Machine Learning works.
How does Machine Learning Work?
ML works in the following steps-
1. Data Collection.
2. Data Preprocessing.
3. Choose a Machine Learning Algorithm.
4. Training the Model.
5. Testing the Model.
6. Tuning the Model.
1. Data Collection
Data collection is the process of gathering information. You can collect data from various sources like social media, interviews, surveys, and other methods.
2. Data Preprocessing
The data you collect is not clean and may contain various ambiguities and noise. To prepare the data for analysis, different preprocessing steps are used to clean it. Along with cleaning the data, some extra processes are also performed. And that is-
2.1 Data Splitting
This is an important step in preparing data and you need to split your data into two parts – Training data (80% of your original data set) and Testing Data (20% of your original data set). These arbitrary splits of your data set may affect how your model performs.
However, to avoid this model’s performance accuracy problem, we use K-Fold Cross-Validation. If you want to learn what K-Fold Cross-Validation is and how it works, this guide will help you. You will learn all the important details about K-Fold Cross-Validation here.
2.2 Dimensionality Reduction
The processing of these large amounts of data is a complex task. It requires more processing power and space. Therefore, Dimensionality Reduction comes into the scene because it reduces the dimension of data.
Dimensionality reduction can be done using methods like Principal Component Analysis and Linear Discriminant Analysis. To understand how Principal Component Analysis works, read this Article- Complete Guide!
The next phase in Machine Learning is-
3. Choose an ML Algorithm
The basics of choosing an ML algorithm depend on the types of problems you are going to solve. For example, if your problem involves classifying items into categories then choose a classification algorithm.
Use clustering algorithms when you need to solve a problem that requires grouping similar types of data.
I will explain the different types of machine learning algorithms in the following section.
4. Training the Model
To train a model properly, you need proper and good-quality training data. Your model’s accuracy mostly depends on data quality.
After completing this training phase, the algorithm becomes a machine learning model.
After training, the next step is-
5. Testing the Model
Before checking the model performance, always confirm that the testing data is different from the training data.
Your model gives a prediction on testing data, but if your model gives incorrect results, then perform the next step (model tuning).
Make sure that the testing data and the training data are different.
6. Tuning the Model
Tuning helps improve the accuracy of your model. Tuning is mainly a trial-and-error process where you adjust some hyperparameters.
Then run the algorithm on the data again and compare your model performance.
During the tuning phase, you choose specific parameter settings that control the learning process of your model. These parameters are set before the training begins and are known as hyperparameters.
Now, let’s move into the next section.
Types of Machine Learning Algorithms
ML Algorithms of four types-
- Supervised Learning.
- Unsupervised Learning.
- Semi-Supervised Learning.
- Reinforcement Learning.
So, let’s see one by one.
1. Supervised Learning
As the name suggests, “Supervised Learning” means learning under supervision. You can also call it classification.
Classification needs some kind of supervision.
This supervision simply refers to using training data that includes the expected or predicted values.
Suppose it is required to predict whether a patient has heart disease or not. To do this, you provide the following data –
Heart Rate | Blood Pressure | Other Symptoms | Heart Disease (Y/N) |
So, here are two types of variables present. Dependent Variables and Independent Variables.
Heart Rate, Blood Pressure and other symptoms are Independent Variables.
The Dependent Variable is- Heart Disease (Y/N).
That means whether the patient has heart disease or not depends on these independent variables.
So, in supervised learning, the training data has Independent variables and Dependent variable kinds of variables or attributes.
Your model learns that if a person has a high heart rate, high blood pressure, and certain other symptoms, then the person is likely to have heart disease.
Here, full supervision is provided to the model. There is no need for the model to figure out patterns by itself. The information needed to classify a problem is already provided during training.
2. Unsupervised Learning
In unsupervised learning, there is no supervision. In Unsupervised Learning, the model learns to find patterns on its own without labeled data. It is also called Clustering.
In supervised learning, the model knows the predicted output. However, in unsupervised learning, the model is trained using data that does not have any known outputs to predict.
Let me simplify it.
In supervised learning the model knows the predicted output. The model learns by using this known outcome to improve its predictions. If you enter a new heart rate, blood pressure, and other symptoms, the model will make a prediction.
But,
For unsupervised learning, the data contains only independent variables. The data does not contain any predicted or dependent variables.
Assume the manager wants to understand the customers better. The manager has the following data-
Customer_id | Gender | Age | Annual Salary | Spending Score |
Here we have only an independent variable. We don’t know the predicted variable.
In short, labelled data is used in supervised learning, whereas in unsupervised learning, the data has no labels.
I hope you now understand.
3. Semisupervised Learning
It is a mix of supervised learning and unsupervised learning. For learning purposes, it uses both labelled and unlabelled data. You can use semi-supervised learning to assign labels to your unlabelled data.
That means if your data is only partially labelled, you can use semi-supervised learning to help label the rest of it.
4. Reinforcement Learning
In reinforcement learning, the model starts without any prior information. The model learns itself.
There is a Reward mechanism in Reinforcement learning. By using the rewards, the model continues to improve.
The model receives a reward for making correct predictions and a penalty for incorrect ones. It increases the model’s prediction accuracy.
The Multi-Armed Bandit problem is a basic example used to explain Reinforcement Learning.
For a detailed explanation of the Multi-Armed Bandit Problem, I will publish a separate article.
Upper Confidence Bound is a way to pick the best option in the Multi-Armed Bandit Problem.
A detailed article on Upper Confidence Bound will be published later.
I believe the types of Machine Learning are clear to you now.
Next, we will discuss the algorithms related to each type.
Supervised Learning Algorithms
Supervised Learning has the following Algorithms-
- Logistic Regression.
- K-Nearest Neighbors(K-NN)
- Support Vector Machine(SVM)
- Kernel SVM.
- Naive Bayes
- Decision Tree Classification.
- Random Forest Classification
Unsupervised Learning Algorithms
Unsupervised Learning has the following Algorithms-
- K-Means Clustering
- Hierarchical Clustering.
- Probabilistic Clustering
Reinforcement Learning Algorithms
Reinforcement Learning has the following Algorithms-
- Model-Free Reinforcement Learning.
- Policy Optimization.
- Q-Learning
- Model-Based Reinforcement Learning.
- Learn the Model
- Given the Model.
Top 5 Books to Learn Machine Learning
If you want to become an expert in machine learning, one of the best ways is to read some good books on the subject. Some of you may like to read books.
I will introduce some of the best books on machine learning that can guide you in a new direction on your learning journey.
These books are highly recommended for those who are just starting out
1. Introduction to ML with Python
This book helps you create a machine learning model in Python step by step. Download PDF Introduction to ML with Python.
2. Python Machine Learning By Example
This is another book especially for beginners. This book provides a step-by-step guide to help you learn everything clearly. Download PDF Python Machine Learning By Example.
3. Foundations of Machine Learning: A Comprehensive Overview
If you have an intermediate understanding of machine learning, these books are highly recommended to help you strengthen your skills: Foundations of Machine Learning.
4. Probability for Statistics and Machine Learning: Advanced Topics and Powerful Applications
If you are interested in exploring Pattern Recognition in depth, this book is an excellent choice. This book explains probability distributions with the help of graphical models.
This book explains both basic and advanced concepts of pattern recognition clearly and easily – Probability for Statistics and Machine Learning.
5. Advanced Predictive Analytics Using Python: Implementing Powerful Data-Driven Solutions
If you already have a basic understanding of machine learning, you can now explore predictive analytics in more detail.
Then this book is just for you. This book explains both the theory and how to apply it in real situations – Advanced Predictive Analytics Using Python.
Best Online Courses On Machine Learning (Free)
- Machine Learning (Coursera)
- Deep Learning Specialization (deeplearning.ai)
- Machine Learning with Python (Coursera)
- Mathematics for Machine Learning Specialization (Coursera)
Machine Learning vs Deep Learning
This is the most common question. Right?
So, the main difference is –
Machine learning can work well with small data.
But when you have a large dataset, the ML Algorithms fail to handle a very large amount of data.
So for that, Deep Learning is used.
Machine learning can work well with small data.
But using deep learning on large volumes of data often gives excellent outcomes.
One more important difference between the two is-
You need to manually enter every input feature in order to train a machine learning model.
But,
In deep learning, you don’t need to enter features by yourself. It can learn from the data and create features automatically.
If you are unsure about the difference between Machine Learning, Artificial Intelligence, Data Science, and Deep Learning, this article will help you understand — ML vs. AI vs. Data Science vs. Deep Learning.
Application of Machine Learning
Nowadays, ML is growing very fast. Here are some common uses of machine learning.
1. Healthcare- Healthcare is using ML. Machine Learning is widely used in healthcare. Healthcare professionals are using ML to detect various diseases like cancer. They are using ML in Pathology. Machine Learning is helping a lot in the fight against the Coronavirus.
2. Marketing- Marketers use machine learning to discover useful patterns in customer and sales data. Supermarket managers can use machine learning to identify customer buying patterns. These patterns help them increase sales.
3. Amazon Recommendation System- When you buy something on Amazon, it uses your purchase history to suggest other products you might like. That is because of ML.
4. Voice Recognition- Google Assistant and Alexa can listen and do what you say. They do this using machine learning technology.
5. Facebook Facial Recognition- Do you know how Facebook recognizes and tags your friends in posts or photos? When you upload a photo. This is because of ML.
Here, I mentioned a few applications of ML. However, machine learning has a wide range of applications.
Machine Learning Jobs
Many individuals are changing their careers and entering the field of machine learning. Simply because Machine Learning is a very interesting field and offers great career opportunities.
Jobs in machine learning usually pay more than jobs in other areas.
There are various posts in ML.
If you want to learn about job roles, salaries, and the skills needed, read this article – Increase Your Earnings with the Top 4 ML Jobs.
How to Learn ML?
Are you thinking to learn ML? If yes, then Congratulations! You are thinking in the right way. The scope of ML is very broad.
The next question you may ask is: What is the best way to learn Machine Learning?
So, you don’t need to worry.
Start Learning: How to start a Machine Learning journey? This article gives you the step-by-step, exact learning path.
Conclusion
The ML topic is a very big topic. This is the start of our ML journey. I hope you now have a clear understanding of its basic concepts. That concludes our introduction to Machine Learning.
FAQ
Stay Ahead in Data Science and ML
Unlock free tutorials, expert guides, and resources on data science, machine learning, and Python — delivered straight to your inbox. (No spam. Unsubscribe anytime.)
✅ Join 50k+ learners | 🔒 We respect your privacy.
You have successfully joined our subscriber list.
Leave a Reply