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 example, a regression model can predict stock prices or forecast the temperature on a given day.
Characteristics of Regression Models
Regression model outputs are continuous and can take on a wide range of values.
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)
Regression predictions are not fixed classes but numerical values that can be directly interpreted.
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 can be categorized based on the nature of their input and output variables.
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 type of regression uses multiple input features to predict a single output.
For example, predicting house price based on area, number of rooms, and location is a multiple regression case.
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.