Model recovery 2026-11-05
Model recovery tests whether a model selection procedure can identify the known model that generated simulated data. Generate observations from each candidate statistical model, fit the candidates using the intended pipeline, and record which candidate is selected. It is a check on the comparison procedure under stated simulation conditions.[ref]
This differs from parameter recovery, which compares estimated parameters with the settings used to generate data within a model. Correctly identifying a model does not automatically imply accurate parameter estimation, and accurate fitting within one model does not establish that a procedure can distinguish it from its competitors.
For an invented example, suppose one hundred simulated datasets come from each of models A and B. The resulting counts are
This confusion matrix estimates selection behavior conditional on the generating model. Its empirical rate of choosing B when A generated is .
The reverse question has a different denominator. Among the datasets for which B was selected, were generated by B, giving . That calculation uses the example's balanced simulation design. It is not interchangeable with the recovery rate for B-generated datasets. Different generating-model frequencies can change the reverse proportion even if the conditional selection behavior stays fixed.[ref]
Recovery depends on parameter ranges, observation count, noise and the selection criterion. Models with nearly indistinguishable predictions can be hard to recover despite successful numerical optimization. Repeat simulations in the regimes relevant to the planned inference. Finally, recovery among a chosen candidate set does not prove that the real system belongs to that set; checking how well the selected model reproduces relevant observations remains a separate task.[ref]
Initialize the weights, evaluate the feature matrix and repeat gradient descent updates until the loss or gradient stabilizes. If includes the intercept, then
A positive step size chosen by a convergence rule or line search gives a practical optimization algorithm. Mini-batch updates or a Newton-type method are alternatives. Fit feature scaling, choose regularization and choose any nonstandard threshold using training or validation data, then freeze the procedure before using the held-out test set.
For held-out examples, set , with unless selected otherwise. The requested classification accuracy is
Always predicting the majority class already gives about 90% accuracy. Report a confusion matrix, classification recall and classification precision as well, especially for the minority class. A precision-recall curve shows the threshold tradeoff without confusing high majority-class accuracy with successful minority-class detection. No numerical test accuracy can be calculated without the held-out predictions and labels.
A random forest fits each of its classification trees to an independent bootstrap sample of the nine observations. At each node it draws mtry=2 candidate coordinates; because the data have exactly two coordinates, both are available, and a CART impurity calculation chooses the split. The trees are grown deeply without ordinary cost-complexity pruning, and their majority vote is the forest prediction.
R reports an out-of-bag error estimate: an observation is predicted only by trees whose bootstrap samples omitted it. The confusion matrix says that class 1 has three correct and three incorrect out-of-bag predictions, while class 2 has one correct and two incorrect predictions. Hence the total out-of-bag error is .
Within-observer agreement versus reference agreement distinguishes consistency of an observer's repeated labels from concordance with a separately defined reference. The first asks whether the observer repeats a decision; the second asks whether that decision matches the comparison standard. In statistical classification, neither quantity can replace the other.
For cases, let and be one observer's labels at two readings, and the reference label. Define the two empirical agreement fractions
An original binary example has 100 cases, half reference-positive and half reference-negative. An observer reverses every reference label and repeats that reversal on the second reading. Then while . Perfect repeat agreement can coexist with complete reference disagreement. An observer always assigning the negative label also has perfect repeat agreement, but only 50 percent reference agreement in this balanced example.
A confusion matrix shows which categories contribute to disagreement, whereas a single overall percentage can conceal systematic shifts or an imbalanced case mix. Reference agreement is classification accuracy relative to that reference, not proof that the reference is infallible. A consensus panel, a later outcome and an independent molecular test answer different validation questions.
A primary 2017 study made this distinction experimentally by having pathologists interpret skin-biopsy sets twice, at least eight months apart, and comparing their interpretations with an experienced consensus reference. The study started with 240 cases and reported reproducibility separately from reference concordance.[ref] The delayed repeat reduced immediate recall, but did not transform repeated judgments into independent biological truths.
A useful evaluation preserves case identity, reading order and the exact reference procedure. If a machine learning classifier learns an observer's systematically shifted labels, it may reproduce that observer well while disagreeing with the external reference. Reporting both comparisons makes that limitation visible. Uncertainty estimates should also account for repeated cases and multiple readings rather than counting every label as an independent subject.