Key takeaway

Exponentiating an average log value produces a geometric quantity. Calling it an arithmetic mean requires an additional, justified statistical argument.

Returning to the original units does not choose the target

A receiving model predicts a logged duration, applies exp and reports the result as average hours. The inverse operation returns a positive number in the chosen original scale, but its label still needs justification. An average on a transformed scale and an arithmetic average in the original scale are different operations. Confirm which quantity the operating decision requests before scoring the prediction.

NIST’s two-parameter lognormal formulas make one distinction explicit: when log time has mean mu and variance sigma², the original-scale median is exp(mu), while the mean is exp(mu+sigma²/2). That relationship is conditional on the stated model. Taking logs of an archive does not itself establish that the model fits it.

Supporting references8.1.6.4 Lognormal

Calculate a finite pair before fitting anything

This hypothetical fixture contains two equally weighted positive durations, 1 and 9 hours. Take natural logs of their numerical values relative to a one-hour reference. The arithmetic mean is (1+9)/2=5 hours. Averaging the logs and exponentiating gives exp((ln(1)+ln(9))/2)=sqrt(9)=3 hours, the geometric mean of this pair.

Both calculations are correct for their named quantities; their inequality is not a rounding error. The author recomputed them locally, without training a regressor. Under the ordinary even-sample median convention, this pair’s sample median is also 5, so the value 3 should not be called its sample median. A population-model median is a separate statement, addressed below.

Synthetic two-duration calculationFormulaResultMeaning
Original-scale arithmetic mean(1+9)/25 hoursAverage of the two original values
Exponentiated mean logexp((ln(1)+ln(9))/2)3 hoursGeometric mean of the two values
Difference between results5−32 hoursDifferent quantities; no fitted-model error claimed

Inspect what the prediction wrapper actually returns

Scikit-learn’s TransformedTargetRegressor documents fitting on a transformed target and applying an inverse function or inverse_transform to predicted values. It supports a log/exp pair and an inverse-consistency check. Those mechanisms preserve the transformation path; they do not by themselves certify that a returned prediction estimates the original-scale conditional arithmetic mean.

Record the target definition, log base, scale/reference unit, handling of zero or negative values, fitted transformation and inverse. If a constant was added before logging, retain it and its rationale rather than treating log(x+c) as log(x). A successful inverse round trip on individual training values does not make averaging and nonlinear inversion commute.

Keep an assumed population distinct from the two records

Consider a second, explicitly hypothetical model: positive durations follow a two-parameter lognormal distribution with mu=ln(3) and sigma²=1. NIST’s formulas give population median 3 hours and population mean 3×exp(0.5)≈4.946164 hours. This is a stipulated mathematical population, not a fitted distribution inferred from the two values above. The author also recomputed this expression locally.

A correction that depends on log-scale variation needs evidence for the relevant model and variance, including whether they apply at each intended prediction input. Do not multiply every inverse prediction by a convenient global factor and call that universally unbiased. Misspecification, heterogeneity, selection and transformed-target preprocessing can change what calculation is justified. Preserve that uncertainty rather than importing a population assumption from a visually skewed histogram.

Give the receiving reviewer the quantity as well as the value

For the finite pair, accept 5 as its arithmetic mean and 3 as its geometric mean. For the separate assumed lognormal population, retain the stated mean and median with the model parameters. None of these values measures a real archive’s prediction accuracy, operational savings or licensing value.

A useful acceptance record names the original target, transformed target, intended estimand, fitted model, inverse path, any justified correction and evaluation on the requested scale. Keep original-scale references available so an MAE or RMSE calculation evaluates the quantity actually needed. When the estimand remains unresolved, withhold the average-hours claim while retaining the precisely labelled transformed prediction.

Tools for this decision

Data inventory builder →Diligence question builder →