Documentation

16.11 Machine learning, neighbours, and shrinkage correction

Autoinit ML is a simulated k-nearest-neighbour regression iterated like Monte Carlo EM. It is not a neural network and it does not use an external pretrained model.

ML update cycle

One iteration

For each subject, ml_samples parameter vectors are drawn from the current log CL/V/KA population. The subject's own doses and sampling times are simulated for every vector. The closest profiles are selected using root-mean-square log-concentration distance; k=max(10,samples/40). Epanechnikov weights emphasize closer neighbours.

BLQ samples contribute asymmetrically: they matter when a prediction lies above the limit, without pretending the censored concentration was measured at zero or half-LLOQ.

Neighbour conditional means and variances update the population. OMEGA combines variance between conditional means with average within-subject conditional variance, correcting the shrinkage that would occur if sparse subjects were represented only by their posterior-like means. Iteration stops when values settle or after 12 cycles.

Controls and reproducibility

--ml-samples defaults to 2000 and cannot be below 200. More simulations improve neighbour coverage at additional cost. --seed fixes named random streams by group, iteration, and subject; thread scheduling therefore does not change results.

The simulated model is primarily one compartment. ML can be biased for multi-compartment profiles; autoinit excludes it from key recommendations when the NLS structural check detects two compartments.

Sparse data

Sparse subjects have broad sets of plausible neighbours. Their within-subject variance remains large, which limits overconfident pull on the population and contributes to shrinkage-corrected OMEGA. That is more appropriate than pretending three samples uniquely determine three parameters, but it remains a starting-value approximation.

Common mistakes

  • Calling ML a black-box fitted population model.
  • Reducing samples below 200 or too far for a release run.
  • Comparing seeds as if they were independent statistical replications.
  • Using one-compartment ML as authoritative for biexponential data.

Checklist

  • Record samples and seed.
  • Confirm subject designs are coded correctly.
  • Review ML versus NLS/NCA disagreement.
  • Inspect OMEGA source and sparse support.
  • Exclude ML where structural assumptions fail.

Further reading

See method combination, OMEGA hierarchy, sparse example, and reproducibility.