The term regression is used when you try to find the relationship between variables (dependent and independent). In Machine Learning, and in statistical modeling, that relationship is used to predict the outcome of future events. Linear regression uses the relationship between the data-points to draw a straight line through all them. Line can be used to predict future values.
-
Data Preparation:
- Splitting the dataset into training and testing sets.
- Normalizing or standardizing the data if necessary.
-
Model Training:
- Using the training dataset to fit a linear regression model.
- Estimating the coefficients (slope and intercept) to minimize the mean squared error.
-
Evaluation:
- Assessing the model's performance using metrics such as R-squared
-
Visualization:
- Plotting the regression line alongside the actual data points to visualize the fit.