Module output and interpretation
The regression module produces five plots, four that measure how well the model predicts and one that reports which features it used.- Feature importance barplot: which microbial features the model relied on most to make its predictions.
- Prediction plot: how close the predicted values are to the true values overall.
- Residual plot: where the model’s errors fall, and whether they depend on the predicted value.
- Relative error plot: whether errors are proportionally larger at low or high true values.
- Q-Q plot of residuals: whether the errors follow the expected pattern, or whether some samples are predicted far worse than others.
Feature importance
Top microbial features ranked by their contribution to the best-performing model's predictions. Longer bars mean higher relative importance within this run. Importance is for ranking, not effect size, direction, or causality.
Why is this plot useful?
- Identifies the features driving predictions: ranks taxa or functions by their contribution, reducing thousands of features to the few most relevant to the target, for validation or follow-up.
- Supports interpretability: explains the basis of the model’s predictions, not just its accuracy.
- Highlights candidate features for hypotheses: flags the features most associated with the target as starting points for investigation.
Prediction plot
The prediction plot is the first check of how well the model predicts. It compares the true value of each sample (x-axis) with the value the model predicted (y-axis).Prediction plot for a model predicting age (age_decimal). Each point is a sample, with the true value on the x-axis and the model's predicted value on the y-axis; the dashed red line marks perfect prediction. In this example the points form a shallower slope than the line: low ages are over-predicted and high ages under-predicted, so the model pulls its predictions toward the middle of the range.
How to read the Prediction Plot:
- Position. Points on the dashed line were predicted exactly. Points above the line were over-predicted, and points below the line were under-predicted.
- Spread. The closer the points sit to the line, the more accurate the model. A spread that changes along the x-axis shows the range of the target where the model works well or poorly.
- Slope. When the cloud of points is flatter than the line, the model over-predicts low values and under-predicts high values. The model pulls its predictions towards the average, so it captures only part of the signal.
- Colour. The colour shows the absolute relative residual, which is the error as a fraction of the true value. The same error gives a redder point when the true value is small. The colour scale runs from the smallest to the largest value in each plot, so compare colours only within one plot.
ml_results.csv (see Exporting the results).
Why is this plot useful?
- Gives an immediate sense of accuracy: shows how far, and in which direction, predictions fall from the truth.
- Reveals systematic bias: for example predictions pulled toward the mean, or a consistent over- or under-prediction.
- Shows where the model works: the range of the target it predicts well versus poorly.
Residual plot
The residual plot shows how large the errors are and where they fall. The x-axis is the predicted value, and the y-axis is the residual, the true value minus the predicted value.Residual plot for the age model. Each point is a sample: the x-axis is the predicted value and the y-axis the residual (true minus predicted), with the dashed line at zero marking perfect prediction. Point colour shows the relative residual (the error as a fraction of the true value), and the boxplot on the right summarizes the spread of residuals.
How to read the residual plot
- Position. Points above the dashed line were under-predicted, and points below the line were over-predicted.
- Centre. The points should spread evenly above and below zero, with no trend along the x-axis. A trend means the model is more accurate for some predicted values than for others.
- Spread. The dotted lines mark ±RMSE. Points far outside them are samples with large errors, worth checking.
- Colour. The colour shows the error as a fraction of the true value, as in the prediction plot.
Why is this plot useful?
- Shows whether errors are unbiased: if the points scatter evenly around zero, the model is not systematically over- or under-predicting.
- Reveals range-dependent accuracy: a trend across the x-axis means the model is more accurate for some predicted values than others.
- Flags individual samples: points far from the line, or coloured for a high relative residual, are candidates to inspect separately.
Relative error plot
The relative error plot shows each error as a fraction of the true value. This matters because a fixed error means different things at different scales: being off by 2 years is minor at age 45 but large at age 5. The relative error plot makes this scale-dependence explicit.The x-axis is the true value, and the y-axis is the relative residual,1 − predicted / true.
Schematic relative error plot of a model that predicts age. Hover over or select the circled points or the boxplot.
How to read the relative error plot
- Position. Points above the dashed line were under-predicted, and points below the line were over-predicted.
- Size. A relative residual of 0.2 means the prediction is 20% away from the true value. The same error in years counts more when the true value is small.
- Trend. A trend along the x-axis shows magnitude bias. In the example, low ages are over-predicted and high ages are under-predicted, so the model pulls its predictions towards the average.
Why is this plot useful?
- Puts errors on a comparable scale: a 2-unit error is judged relative to the true value, not in absolute terms.
- Exposes bias at the extremes: shows whether the model is proportionally worse for small or large targets.
- Complements the residual plot: the residual plot shows absolute error, this one shows error relative to size.
Q-Q plot of residuals
The Q-Q (quantile-quantile) plot compares the distribution of the residuals with a normal distribution. Points close to the red line mean that the errors are approximately normal.Schematic Q-Q plot of the residuals of a model that predicts age.
The four patterns a residual Q-Q plot can show. Hover over or select a plot.