COSC 3430 · Artificial Intelligence

Linear Regression Prediction

Five students' study hours and test scores fit a line, y = mx + b. Drag the red point (or the slider) to pick a new x — watch the model read the prediction straight off the line, the same way as the in-class figure.
x (hours studied)6.0
predicted score ŷ —
x (hours studied) —
ŷ = 41.5 + 7.5 × x

The line was fit on 5 students (1–5 hours studied). Slide past x = 5 and the model is extrapolating — predicting outside any data it actually saw. Keyboard: focus the red point, use left/right arrow keys.

Built to accompany COSC 3430 (Artificial Intelligence). The line's slope (7.5) and intercept (41.5) are the real values scikit-learn's LinearRegression fits on this data — nothing here is a canned animation.