Regression Model for Predicting Continuous Values
Regression
models analyze input data to predict continuous numerical values. Unlike classification models that categorize input data into specific classes, regression models predict a numerical value corresponding to the given input.
For instance, a regression model can be used to predict future stock prices or forecast the temperature on a particular day.
Characteristics of Regression Models
The values predicted by regression models can continuously vary.
For example, a model predicting temperature will not output a fixed number but rather various real numbers like 23.5°C, 24.1°C, 25.3°C.
Input: Weather Data → Output: 23.5°C (Predicted Temperature)
The predictions of a regression model are not simple classes but numerically interpretable values.
For instance, a model predicting a student's exam score provides an estimated score like 82.7
rather than simply indicating pass
or fail
.
Types of Regression Models
Regression models are categorized into several types based on the characteristics of the values they predict.
1. Simple Regression
This model uses a single input variable (feature) to predict a single output value.
For example, a model predicting house price based on its area falls into this category.
Input: House Area → Output: Predicted Price
2. Multiple Regression
This model uses multiple input variables (features) to predict a single output value.
For example, a model predicting house price based on area, number of rooms, and location falls into this category.
Input: (Area, Number of Rooms, Location) → Output: Predicted Price
Evaluating the Performance of Regression Models
When evaluating the performance of regression models, metrics such as Mean Squared Error (MSE)
, Mean Absolute Error (MAE)
, and R² Coefficient of Determination
are used more commonly than Accuracy
.
This is important to determine how close the model's predictions are to the actual values.
In the next lesson, we will delve into these evaluation metrics for regression models in detail.
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.