Model Complexity Curve Calculator

Compare training and validation curves, locate the optimal model complexity, diagnose underfitting or overfitting, and export clear evidence for better machine learning decisions confidently.

Analysis results

Load example data or enter values, then calculate the curve.

Waiting for data
Recommended complexity
Best validation performance
Training performance
Generalisation gap
Test performance
Maximum gap
Average gap
Simpler acceptable model

Automatic interpretation

No interpretation is available yet.

Experiment summary

Dataset
Model
Metric
Selection method
Cross-validation folds
Sample size
Random seed
Confidence level

Detailed results

ComplexityTrainingValidationTestGapScore changeMarginal improvementStd. dev.Confidence intervalRegionOptimal
No results yet.

Experiment details

Metric and optimisation

metric units
Balanced method weight: 0.25

Curve data

Enter at least three complexity points. Blank test or deviation values are allowed.

ComplexityTrainingValidationTestStd. dev.Series labelAction
CSV columns: complexity, training, validation, test, stdDev, series.

Smoothing and confidence settings

Current value: 3

Chart customisation

Model comparisons

Save the current result, then load another model and overlay both validation curves.

No comparison runs saved.

Formula used

Generalisation gap = Training performance − Validation performance

For higher-is-better metrics, a large positive gap can indicate overfitting. For lower-is-better error metrics, the calculator compares validation error against training error. It also reverses improvement signs where required.

The one-standard-error rule selects the simplest model within one standard error of the best validation score. The balanced method combines normalized validation quality with a complexity penalty. Elbow detection finds the strongest change in slope.

How to use

  1. Choose the experiment, model, metric, and complexity measure.
  2. Enter training, validation, and optional test values.
  3. Add deviations when cross-validation uncertainty is available.
  4. Select an optimal-complexity method and smoothing option.
  5. Adjust chart labels, scales, markers, regions, and thresholds.
  6. Calculate, interpret the result, and export the analysis.

Example data

Polynomial degreeTraining RMSEValidation RMSE
18.89.3
26.46.9
34.95.4
43.84.8
53.05.2
62.46.1

Understanding model complexity

Bias and variance

Simple models often have high bias and stable predictions. Complex models can reduce bias but increase variance. The preferred model balances both effects.

Underfitting

Underfitting occurs when training and validation performance are both weak. Increasing useful complexity may improve both curves. More informative features can also help.

Overfitting

Overfitting appears when training performance keeps improving while validation performance worsens. The widening gap signals reduced generalisation. Regularisation or simpler models may help.

Reading the curve

Follow validation performance across ordered complexity values. Identify the best region, then inspect uncertainty and gaps. Prefer simpler models when performance is nearly equal.

Frequently asked questions

What does model complexity mean?

It measures a model’s flexibility or capacity. Examples include tree depth, polynomial degree, estimator count, or parameter count.

Which validation metric should I use?

Use the metric matching your prediction goal. Classification and regression tasks usually require different measures.

Why can training and validation curves diverge?

A complex model may memorize training patterns. Its performance on unseen validation data can then decline.

What is the one-standard-error rule?

It selects the simplest model whose validation result remains within one standard error of the best model.

Should I smooth the curves?

Smoothing can reveal broad trends. Always retain original values so important variation remains visible.

Can I use logarithmic axes?

Yes, when all plotted values are positive. The calculator warns about zero or negative values.

How many complexity points are required?

At least three points are recommended. More points usually produce a clearer trend and better elbow estimate.

What does a small generalisation gap mean?

It suggests similar training and validation behavior. However, both performances may still be poor.

Can I compare different algorithms?

Yes. Save each run and overlay validation curves. Comparable metrics and scales produce the clearest comparison.

Related Calculators

Validation CurveTraining Loss CurveValidation Loss CurveAccuracy CurveError Rate CurveBias-Variance CurveCross-Validation Score PlotModel Comparison Bar ChartMetric Radar ChartHyperparameter Performance Heatmap

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.