Skip to main content

5 docs tagged with "Linear Regression"

Fitting lines and hyperplanes — the normal equation, coefficients, and their limits.

View all tags

Error in the Units of y

Why MAE, MSE and RMSE can report three different numbers for the same predictions, why RMSE is never below MAE, what their ratio tells you about outliers, and why scikit-learn hands back a negative mean squared error.

Multiple Linear Regression

More than one feature — the normal equations solved by hand, why a coefficient changes when a correlated feature joins it, and the measurement showing Adjusted R² fails to penalise 100 columns of pure noise while cross-validation catches them cleanly.

R², Adjusted R² and MAPE

Settles why R² can exceed 1 or go negative, why SST = SSR + SSE only holds for a least-squares fit, why adding a junk feature never lowers R² but does lower Adjusted R², and why scikit-learn's MAPE returns 0.0296 rather than 2.96%.

Simple Linear Regression

Fitting a line to one feature — the two coefficients derived by hand and checked against scikit-learn, the five error measures computed from the same residuals, and why a genuinely useful feature can look exactly like noise.

The Matrix Formulation

Solving for every coefficient in one algebraic step — the design matrix, the column of ones, the normal equation verified against scikit-learn, and the three situations where the inverse does not exist.