Regularisation Curve Calculator

Compare regularisation strengths, visualise training and validation behaviour, inspect coefficient shrinkage, select stable models, and export clear machine learning results with confidence and clarity.

Calculated Results

Ready

Interpretation


    

1. Data Input

Include a header row. Use numeric features and a numeric target. Binary targets may be 0/1 or two text labels.
Required columns: strength, train, validation. Optional columns: test, cvMean, cvStd, nonzero, l1Norm, l2Norm.

2. Model and Preprocessing

3. Regularisation Configuration

4. Validation and Metric Settings

5. Chart Customisation

Regularisation Curve

Coefficient Path Plot

Model Complexity Plot

Curve Data Table

Coefficient Results

Formula Used

L1 objective: Data Loss + λΣ|βj|

L2 objective: Data Loss + λΣβj2

Elastic Net objective: Data Loss + λ[ρΣ|βj| + (1 − ρ)Σβj2]

Generalisation gap: Validation metric − Training metric for lower-is-better errors. The sign is reversed for higher-is-better scores.

One-standard-error rule: choose the strongest regularisation whose cross-validation result remains within one standard error of the best model.

How to Use

  1. Load a sample dataset, upload a file, or paste data.
  2. Select regression or binary classification.
  3. Choose L1, L2, Elastic Net, or a baseline.
  4. Set the parameter range and validation method.
  5. Choose a metric and chart presentation.
  6. Calculate the curves and inspect the selected point.
  7. Review coefficient shrinkage and model complexity.
  8. Export charts, tables, configuration, or a PDF.

Example Data

sizeroomsagedistancetarget
8502187.2178
12003105.1245
1560463.2336
9802228.5191

Interpretation Guide

Weak regularisation can produce low training error and poor validation performance. This pattern often signals overfitting. Coefficients may remain large and unstable.

Strong regularisation can shrink useful coefficients excessively. Training and validation performance may both deteriorate. This pattern often signals underfitting.

The preferred region usually balances predictive quality and simplicity. Stable nearby values strengthen confidence. Cross-validation helps reduce selection noise.

Frequently Asked Questions

What does a regularisation curve show?

It shows model performance across penalty strengths. Training and validation curves reveal complexity changes. Coefficient paths show variable shrinkage.

What is the difference between L1 and L2?

L1 can shrink coefficients exactly to zero. L2 usually keeps every coefficient nonzero. Elastic Net combines both behaviours.

Why should features be scaled?

Penalties act directly on coefficient size. Unscaled features receive unequal effective penalties. Scaling makes comparisons more meaningful.

What does C mean?

C is inverse regularisation strength. Smaller C values create stronger penalties. Lambda and alpha usually work oppositely.

Which metric should I choose?

Choose a metric matching the prediction task. Regression often uses RMSE or MAE. Classification may use log loss or F1.

What is the one-standard-error rule?

It selects a simpler near-best model. The allowed range uses cross-validation uncertainty. This often improves stability and interpretability.

Why do training and validation curves diverge?

A large gap often suggests overfitting. Regularisation can narrow that gap. Excessive penalties can hurt both curves.

Can I use precomputed results?

Yes, select precomputed curve data. Paste strength and metric columns. The page will graph and analyse them.

Does the calculator support classification?

It supports binary logistic regression. Use numeric or two-label targets. Choose classification metrics from the menu.

Can results be exported?

Charts support PNG and SVG export. Tables download as CSV files. Printing provides a PDF-ready report.

Related Calculators

Cost Function CurveGradient Descent Path PlotContour Plot3D Loss SurfaceLearning-Rate Comparison PlotSigmoid Function GraphSoftmax Probability PlotEntropy CurveGini Impurity CurveCross-Entropy Loss Curve

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.