Calculator Input
Enter matching actual and predicted values. Separate entries with commas, spaces, semicolons, or line breaks.
Example Data Table
| Observation | Actual | Predicted | Residual | Squared Residual |
|---|---|---|---|---|
| Sample 1 | 12.0 | 11.4 | 0.6 | 0.36 |
| Sample 2 | 15.0 | 14.8 | 0.2 | 0.04 |
| Sample 3 | 18.0 | 18.6 | -0.6 | 0.36 |
| Sample 4 | 20.0 | 19.1 | 0.9 | 0.81 |
| Sample 5 | 23.0 | 22.4 | 0.6 | 0.36 |
Formula Used
Residual: ei = yi - ŷi
Squared Residual: ei2 = (yi - ŷi)2
Sum of Residual Squares: RSS = Σ(yi - ŷi)2
In AI and machine learning, a lower RSS usually means predictions stay closer to true values. It is often reviewed alongside RMSE, MAE, and R².
How to Use This Calculator
- Enter a dataset name for your model run.
- Paste actual values in the first large input area.
- Paste predicted values in the second large input area.
- Optionally add custom observation labels in matching order.
- Select the decimal precision for displayed metrics.
- Press Calculate RSS to show the result above the form.
- Review the metrics, detail table, and Plotly visualization.
- Use the CSV or PDF buttons to save results.
Frequently Asked Questions
1. What does RSS measure in machine learning?
RSS measures total squared prediction error. It adds every squared residual across observations. Smaller values usually indicate a tighter model fit on the evaluated dataset.
2. Why are residuals squared?
Squaring removes sign cancellation and penalizes larger errors more heavily. That makes the metric sensitive to large misses and useful for regression evaluation.
3. Is a lower RSS always better?
Lower RSS is better on the same dataset and scale. It should not be compared across datasets with different sizes or target magnitudes without normalization.
4. What is the difference between RSS and MSE?
RSS is the total squared error sum. MSE divides RSS by the number of observations. MSE is easier to compare across equally scaled datasets.
5. Can I use this for neural network outputs?
Yes. Any regression model with actual and predicted numeric values can use this calculator, including neural networks, linear regression, boosting models, and ensemble predictors.
6. Why can R² become undefined here?
R² depends on target variance. If all actual values are identical, total variance becomes zero. In that case, the calculator labels R² as undefined.
7. What input separators does this page support?
You can separate entries with commas, spaces, semicolons, vertical bars, or line breaks. The actual and predicted lists must still contain matching counts.
8. Does this calculator export the detailed results?
Yes. After calculation, you can export a CSV file for spreadsheets or a PDF summary for documentation, reporting, sharing, or audit records.