What is Learning for a machine?
A machine is said to be learning from past Experiences(data feed in) with respect to some class of Tasks, if it’s Performance in a given Task improves with the Experience.
Supervised Learning :
Supervised learning is when the model is getting trained on a labelled dataset. Labelled dataset is one which have both input and output parameters. In this type of learning both training and validation datasets are labelled as shown in the figures below.
Both the above figures have labelled data set –
- Figure A: It is a dataset of a shopping store which is useful in predicting whether a customer will purchase a particular product under consideration or not based on his/ her gender, age and salary.
Input : Gender, Age, Salary
Output : Purchased i.e. 0 or 1 ; 1 means yes the customer will purchase and 0 means that customer won’t purchase it.
- Figure B: It is a Meteorological dataset which serves the purpose of predicting wind speed based on different parameters.
Input : Dew Point, Temperature, Pressure, Relative Humidity, Wind Direction
Output : Wind Speed
Training the system:
While training the model, data is usually split in the ratio of 80:20 i.e. 80% as training data and rest as testing data. In training data, we feed input as well as output for 80% data. The model learns from training data only. We use different machine learning algorithms(which we will discuss in detail in next articles) to build our model. By learning, it means that the model will build some logic of its own.
Once the model is ready then it is good to be tested. At the time of testing, input is fed from remaining 20% data which the model has never seen before, the model will predict some value and we will compare it with actual output and calculate the accuracy.
Types of Supervised Learning:
- Classification : It is a Supervised Learning task where output is having defined labels(discrete value). For example in above Figure A, Output – Purchased has defined labels i.e. 0 or 1 ; 1 means the customer will purchase and 0 means that customer won’t purchase. The goal here is to predict discrete values belonging to a particular class and evaluate on the basis of accuracy.
It can be either binary or multi class classification. In binary classification, model predicts either 0 or 1 ; yes or no but in case of multi class classification, model predicts more than one class.
Example: Gmail classifies mails in more than one classes like social, promotions, updates, forum.
- Regression : It is a Supervised Learning task where output is having continuous value.
Example in above Figure B, Output – Wind Speed is not having any discrete value but is continuous in the particular range. The goal here is to predict a value as much closer to actual output value as our model can and then evaluation is done by calculating error value. The smaller the error the greater the accuracy of our regression model.
Example of Supervised Learning Algorithms:
- Linear Regression
- Nearest Neighbor
- Guassian Naive Bayes
- Decision Trees
- Support Vector Machine (SVM)
- Random Forest
- ML | Semi-Supervised Learning
- Supervised and Unsupervised learning
- Difference between Supervised and Unsupervised Learning
- Regression and Classification | Supervised Machine Learning
- Learning Model Building in Scikit-learn : A Python Machine Learning Library
- Learning to learn Artificial Intelligence | An overview of Meta-Learning
- ML | Reinforcement Learning Algorithm : Python Implementation using Q-learning
- Artificial intelligence vs Machine Learning vs Deep Learning
- Introduction to Multi-Task Learning(MTL) for Deep Learning
- ML | Types of Learning - Part 2
- How to Start Learning Machine Learning?
- Deep Q-Learning
- ML | Active Learning
- Machine Learning in C++
- ML | What is Machine Learning ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Akanksha_Rai