This interactive demo helps you understand linear regression, one of the fundamental concepts in machine learning and statistics. Linear regression finds the best straight line through data points to model relationships between variables.
You'll explore how changing the line parameters affects the fit quality, learn about different error metrics, and work with real civil engineering datasets to see linear regression in action.
• Adjust the (intercept) and (slope) sliders to move the regression line and observe how the error metrics change
• Load sample datasets from civil engineering examples or generate/add your own data points by clicking on the plot
• Toggle visualization options to explore squared errors and confidence intervals
What is the maximum R² score you could achieve? Which sample dataset allows for the best fit?
Live Competition Mode
It's showtime! Your goal is to achieve the highest R² score in class using only manual parameter adjustment.
⚠️ Keep this tab active - switching to another tab may temporarily remove you from the leaderboard
Competition Rules:
• Everyone uses the same randomly generated dataset
• Only manual slider adjustment allowed - no "Find Optimal Solution" button
• Real-time leaderboard shows top performers
• Your anonymous name:
Scoring:
• Primary ranking by R² score (higher is better)
• Secondary ranking by MSE (lower is better)
• Live updates as you adjust parameters