NeuroNomixer logoNeuroNomixer
  • Home
  • Blog
  • Visual Guides
  • Authors
  • Contact
Sign InSign Up
NeuroNomixer logo
HomeBlogAuthorsContactPrivacy Policy

© 2026 NeuroNomixer — Built with Next.js & Tailwind CSS

Visual Guides/Linear Regression
Machine Learning

Linear Regression: Draw the Best Fit

Drag data points and watch the regression line, residuals, loss function, and R² update live. Click anywhere on the chart to add new points.

Points dragged: 0/5
Datasets loaded: 0/2

Sign in to track progress

Model Metrics

Slope (β₁)
0.703
Intercept (β₀)
12.858
R²(Strong fit)
0.7972
Pearson r
0.8928
MSE
76.935
N points
18

Equation

ŷ = 0.70x + 12.86

Display

Load Dataset

Interactive Scatter Plot

regression line
00252550507575100100X (Feature)Y (Target)

Drag gold dots to move · Click empty area to add point

Loss Landscape (MSE)

SlopeMSEoptimal

The gold dot is always at the minimum: ordinary least squares finds the exact optimal slope analytically.

R² Gauge

R² = 0.797
0: No fit0.5: Moderate1: Perfect

R² = fraction of variance in Y explained by X. Drag an outlier far from the line to watch R² drop.

Ordinary Least Squares

Finds the line that minimizes the sum of squared residuals (vertical distances from points to line).

Residuals

The difference between actual y and predicted ŷ. Ideally: small, random, no pattern.

Assumptions

Linearity, independence, homoscedasticity, normality of residuals. Violations hurt inference.

← Previous GuideNext Guide →