Multi-linear regression extends simple linear regression to handle multiple input features simultaneously. Instead of predicting from just one variable, we can use several features to make more accurate predictions.

In civil engineering, this is particularly valuable for projects like predicting housing costs from multiple property characteristics, estimating structural loads from various design parameters, or forecasting traffic flow from multiple environmental factors.
• Click feature boxes to enable/disable them (colored = enabled, gray = disabled). The model will automatically re-train.
• Using the plot below, compare the actual vs predicted prices. The closer the points are to the diagonal line, the better the predictions
• Try different feature combinations to see how they affect performance, and observe how metrics change with different feature sets

Which combination of features maximises R²? Why do you think that is?
Understanding the Results:

R² values: 0.0-0.3 (poor), 0.3-0.7 (moderate), 0.7+ (good fit)
MSE (Mean Squared Error): Lower values indicate better fit - measures average squared differences
MAE (Mean Absolute Error): More intuitive than MSE - average absolute prediction error
Feature importance: Notice which features contribute most to prediction accuracy
Overfitting vs Underfitting: Too few features may underfit; all features don't always improve performance
MAE = 0.0
MSE = 0.0
R² = 0.0

Mathematical Foundations

Multiple linear regression extends the single-variable framework to handle multiple features simultaneously. With $p$ features, the linear model becomes $\hat{y} = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \cdots + \beta_p x_p$, where $\beta_0$ is the intercept (previously denoted $\alpha$ in single-variable regression) and $\beta_1, \ldots, \beta_p$ are the weights for each feature.

For our housing example: $\mathrm{Price} = \beta_0 + \beta_1 \cdot \mathrm{Area} + \beta_2 \cdot \mathrm{Bedrooms} + \beta_3 \cdot \mathrm{Bathrooms} + \beta_4 \cdot \mathrm{Stories}$. Each feature contributes independently to the prediction, weighted by its corresponding parameter.

Developed by Kevin Yu & Panagiotis Angeloudis