13 Sep Supervised Machine Learning
In supervised learning, the machine is enabled to predict based on labeled data fed to it. In layman’s terms, we can easily say that the models are trained on labeled examples and make predictions on unlabelled examples.
We discussed labeled and unlabelled examples above. Let us see what they are.
Labeled Data
Includes one or more features and a label. Let us see an example to predict the value of a house. The features here are four and one label:
- Features: Bedrooms, Bathrooms, Balcony, Area, Property Age
- Label: Property Price
Here it is:
Bedrooms | Bathrooms | Balcony | Area (Sq. ft) | Property Age | Property Price |
---|---|---|---|---|---|
4 | 2 | 2 | 1500 | 5 | $290,000 |
2 | 1 | 1 | 1200 | 15 | $120,000 |
5 | 3 | 2 | 2000 | 7 | $340,000 |
3 | 3 | 1 | 1400 | 5 | $250,000 |
1 | 1 | 1 | 700 | 3 | $100,000 |
Unlabelled Data
Includes one or more features but no label. Let us see the same example to predict the value of a house. The features here are four but no label:
- Features: Bedrooms, Bathrooms, Balcony, Area, Property Age
- Label: None (no target variable, such as Property Price)
Here it is:
Bedrooms | Bathrooms | Balcony | Area (Sq. ft) | Property Age |
---|---|---|---|---|
4 | 2 | 2 | 1500 | 5 |
2 | 1 | 1 | 1200 | 15 |
5 | 3 | 2 | 2000 | 7 |
3 | 3 | 1 | 1400 | 5 |
1 | 1 | 1 | 700 | 3 |
Let us now summarize:
- The tasks are well-defined in supervised learning.
- The prediction is based on labeled data in supervised learning.
- The prediction or decisions are based on past data in supervised learning
Example – Supervised Learning
Let us see an example. Our data includes Hexagon and Star shapes. The below image demonstrates a machine learning supervised learning process:
- Past Data: On the left, there are two sets of data: one with three hexagons and one with three star shapes.
- New Data: At the bottom, there’s new data, featuring one hexagon and one star.
- Machine Learning Model: The center showcases our machine learning model.
- Predicted Output: On the right, you see the predicted output based on the new data, like the past data sets.
The arrows show how past data and new data flow into the model, which then predicts the output. This image simplifies understanding how machine learning uses past data to make predictions on new data:
The following are the two types of Supervised learning:
- Classification
- Regression
Classification
Classification is a type of supervised learning where the goal is to predict a categorical output variable based on one or more input features.
The following are the examples of Classification:
- Spam vs. Not Spam email classification
- Cancer diagnosis based on tumor characteristics
- Handwritten digit recognition (e.g., MNIST dataset)
Algorithms like Decision Trees, K-Nearest Neighbors, Support Vector Machines, Naïve Bayes, etc. Neural Networks are used for classification.
Here are some more examples of Classification:
- Email Spam Detection: Classifying email spam from your emails
- Sentiment Analysis: Determining if a piece of text is positive, negative, or neutral.
- Image Recognition: Identifying objects in an image, like distinguishing between cats and dogs.
- Medical Diagnosis: Classifying medical images as cancerous or non-cancerous.
Regression
Regression is a type of supervised learning where the goal is to predict a continuous output variable based on one or more input features.
The following are the examples of Regression:
- Predicting house prices based on features like number of bedrooms, square footage, and location.
- Forecasting stock prices based on historical data and economic indicators.
- Predicting a person’s height based on their age, gender, and weight.
- Linear Regression: Predicts a continuous numerical output variable.
- Logistic Regression: Predicts a binary categorical output variable (0/1, yes/no, etc.).
- Ordinal Regression: Predicts an ordinal categorical output variable (e.g., ranking, rating).
- Poisson Regression: Predicts a count output variable (e.g., number of accidents, number of sales).
Here are some more examples of Regression:
- Age Prediction: Predicting the age of a person based on height, weight, health, and other factors.
- House Price Prediction: Predicting house price based on number of rooms, bathrooms, balcony, parking, location, etc.
- Stock Price Forecasting: Predicting future stock prices based on historical data.
- Weather Prediction: Estimating future temperatures or rainfall amounts.
- Forecasting Sales: Predicting future sales based on past sales data.
Both the classification and regression concepts will be discussed later in the Machine Learning – Classification and Machine Learning – Regression sections.
If you liked the tutorial, spread the word and share the link and our website Studyopedia with others.
For Videos, Join Our YouTube Channel: Join Now
Read More:
No Comments