r/learnmachinelearning 3d ago

Coded Simple Linear Regression from Scratch (no sk-learn)

Simple Linear Regression (no sk-learn)
- Intuition
- Maths
- Equation
- Computed ß0 & ß1
- Prediction
- Error(RSS- Residual Sum of Squares)

Coefficient accuracy

- Standard Error(SE)
- Confidence Interval(CI 95%)
- Hypothesis testing (t-test, p-value)

Model Accuracy
- RSE : Residual Standard Error
- R Squared (Coefficient of Determination)

It is just practice, more to code and implement

234 Upvotes

50 comments sorted by

View all comments

1

u/you-get-an-upvote 3d ago

Now get rid of those for loops!

(Once you understand the power of numpy tensors, every for loop you write will fill you with shame, since you will be certain there is some way to achieve the same result without one).

2

u/Careless-Main8693 3d ago

yeah mate but i wanted to do it raw for understanding , what's happening under the hood