Three lines. Only one is linear regression. Pick A, B or C before the answer 👀
#machinelearning #linearregression #datascience
Three lines. Only one is linear regression. Pick A, B or C before the answer 👀
This is real data from 1857: Ernst Engel’s records of income and food spending for 235 Belgian households.
Each orange square is one error. Its area is the squared distance from a point to the line. The “best fit” is the line with the smallest total square area:
A: MSE 42,512
C: MSE 37,023
B: MSE 12,910 ✅
Gradient descent starts at zero and finds B in 100 steps:
food = 0.485 · income + 147.5
So every extra 100 francs of income goes with about 49 more francs spent on food. R² = 0.83: one straight line explains 83% of the data.
And w·x + b is exactly what a neuron computes before its activation function. Every neural network starts here.
💬 Comment LINEAR and I’ll send you the NumPy code.
💾 Save this for later.
#machinelearning #linearregression #datascience #python #numpy
Comments
Comments from the original post on Instagram
No comments yet
