Create 20 linearly correlated artificial data then visualize it and calculate the coefficient and the intercept values also evaluate the RMSE.
- Linear Regression
- Python
- Numpy
- Matplotlib
- Pandas
- Sympy
- Scikit-learn
- Create 20 random data with random
- For manual, calculate with the formula for coefficient and intercept
- For Scikit-Learn modules, use linear_model
- Calculate the RMSE
Obtained for the manual model
- Coefficient = 4.989500838411049
- Intercepts = -4.400486397583558
- RMSE = 0.2810131078597593
Obtained for Scikit-Learn models
- Coefficient = 4.98950084
- Intercepts = -4.400486397583559
- RMSE = 0.28101310785975925
- All of the scripts are being kept here.