Methods: Case-Based Reasoning with Statistical Models
Dr. Simon Müller
2026-11-24
Source:vignettes/distance_measures.rmd
distance_measures.rmdThis vignette explains what the package computes and why. Each method is described mathematically, illustrated with a small example that recomputes the package’s result by hand, and assessed with its advantages and disadvantages. The Get Started vignette shows the workflow, Comparing the Approaches applies all distances to the same data, and the benchmark article compares their predictive performance.
What the package does
A case base is a set of solved cases : covariates (e.g. age, sex, tumour stage) and an outcome (a class, a number, or a censored survival time ). Case-based reasoning (CBR) answers a new problem by the similar cases of the case base, in four steps (Aamodt & Plaza, 1994):
| Step | Mathematical task | Functions |
|---|---|---|
| Retrieve | find , the cases with the smallest |
get_similar_cases(),
calc_distance_matrix(), explain_match()
|
| Reuse | predict from |
predict_outcome(), predict_survival(),
get_counterfactual_cases()
|
| Revise | measure how good the predictions are on test cases |
evaluate(), evaluate_survival(),
check_ph()
|
| Retain | add and remove cases, find noisy and redundant cases |
add_cases(), remove_cases(),
assess_cases()
|
Everything depends on the distance . The package’s idea (Dippon et al., 2002) is to learn from a statistical model of the outcome: a regression model, a boosted model or a random forest is fitted to the case base, and two cases are close if the model considers them alike. The Gower distance is included as a model-free baseline.
Why the distance must be learned
Take the naive distance, the mean absolute difference of the features, It has three problems:
- Categorical features. is not defined for sex or tumour type.
- Scale. Measuring age in months instead of years multiplies its contribution by 12. Features with large numbers dominate.
- Relevance. Every feature counts equally. For lung cancer survival, the performance status matters more than the patient’s city, but cannot know that.
Standardising the features solves the second problem, but not the third. Only knowledge of the outcome can tell which features matter, and how much. A statistical model of the outcome contains exactly this knowledge.
Regression models: distances in contribution space
Definition
LinearModel, LogisticModel and
CoxModel fit a regression model with the
rms package. Its linear predictor is a sum over model
terms
(a variable, a spline of a variable, an interaction, …):
where
are the columns of the design matrix that belong to term
and
their estimated coefficients. We call
the contribution of term
.
The distance of two cases is the
distance of their contributions:
For main effects this is the weighted
distance of Dippon et al. (2002):
- numeric feature : , so the term adds ;
- categorical feature with level coefficients (zero for the reference level): the term adds , which is zero for equal levels.
All three problems of the naive distance are solved: categorical features enter through their coefficients, the coefficient scales inversely with the unit of the feature, and features without effect get a coefficient near zero.
What a distance means
By the triangle inequality, the distance bounds the difference of the linear predictors: The linear predictor has a meaning on the scale of the model, so the distance has one too:
| Model | means | |
|---|---|---|
LinearModel |
expected outcome | expected outcomes differ by at most (in units of ) |
LogisticModel |
log-odds | odds ratio between the cases in |
CoxModel |
log relative hazard | hazard ratio between the cases in |
For example, two patients at Cox distance have hazards that differ by at most .
A worked example
We fit a Cox model for the survival of lung cancer patients.
lung2 <- na.omit(lung[, c("time", "status", "age", "sex", "ph.ecog", "ph.karno", "wt.loss")])
lung2$status <- lung2$status - 1
lung2$sex <- factor(lung2$sex, labels = c("male", "female"))
cox <- CoxModel$new(Surv(time, status) ~ age + sex + ph.ecog, lung2)
cox$fit()
beta <- coef(cox$model_fit)
beta## age sex=female ph.ecog
## 0.01347899 -0.57204879 0.45638532
Older age and a worse performance status (ph.ecog, 0 =
fully active to 3 = bedridden half the day) increase the hazard; women
have a lower hazard. Now take two patients:
pair <- lung2[c("19", "149"), ]
pair## time status age sex ph.ecog ph.karno wt.loss
## 19 61 1 56 female 2 60 10
## 149 31 1 82 male 0 100 27
By hand, the distance is the sum of three terms:
by_hand <- c(age = abs(beta[["age"]] * (pair$age[1] - pair$age[2])),
sex = abs(beta[["sex=female"]] * ((pair$sex[1] == "female") - (pair$sex[2] == "female"))),
ph.ecog = abs(beta[["ph.ecog"]] * (pair$ph.ecog[1] - pair$ph.ecog[2])))
by_hand## age sex ph.ecog
## 0.3504537 0.5720488 0.9127706
sum(by_hand)## [1] 1.835273
explain_match() reports the same terms, sorted by their
share of the distance, and calc_distance_matrix() the same
total:
knitr::kable(cox$explain_match(pair[1, ], pair[2, ]), digits = 3)| term | query_contribution | case_contribution | distance | share |
|---|---|---|---|---|
| ph.ecog | 0.913 | 0.000 | 0.913 | 0.497 |
| sex | -0.572 | 0.000 | 0.572 | 0.312 |
| age | 0.755 | 1.105 | 0.350 | 0.191 |
cox$calc_distance_matrix(pair[1, ])[rownames(lung2) == "149", ]## [1] 1.835273
Why not just compare risk scores?
The two patients have almost the same linear predictor, i.e. the same predicted risk:
eta <- predict(cox$model_fit, newdata = pair, type = "lp")
eta## 19 149
## 0.05765668 0.06738851
## 149
## 0.00973183
The 56-year-old woman with a poor performance status and the 82-year-old man who is fully active have the same risk for different reasons. A distance based only on would treat them as identical cases; in contribution space they are far apart, because each term is compared on its own. Cases retrieved in contribution space are similar in risk and in the reasons for the risk, which is what makes them useful as precedents.
Scale invariance
Measuring age in months changes the coefficient by a factor of 1/12, and the distance not at all:
lung_months <- transform(lung2, age = age * 12)
cox_months <- CoxModel$new(Surv(time, status) ~ age + sex + ph.ecog, lung_months)
cox_months$fit()
max(abs(cox_months$calc_distance_matrix() - cox$calc_distance_matrix()))## [1] 4.440892e-16
Non-linear effects and interactions
Any rms term is allowed, e.g. a restricted cubic
spline rcs(age, 4) or an interaction
sex * ph.ecog. The contribution
is then a non-linear function, and equal differences in a variable count
differently in different ranges: below, the eight years between 50 and
58 and between 72 and 80 give different distances. All columns of an
interaction belong to one term, so the term is compared as a whole.
cox_rcs <- CoxModel$new(Surv(time, status) ~ rcs(age, 3) + sex + ph.ecog, lung2)
cox_rcs$fit()
ages <- data.frame(age = c(50, 58, 72, 80), sex = factor("male", levels(lung2$sex)), ph.ecog = 1)
age_distance <- function(a, b) sum(cox_rcs$explain_match(ages[a, ], ages[b, ])$distance)
c("50 vs 58" = age_distance(1, 2), "72 vs 80" = age_distance(3, 4))## 50 vs 58 72 vs 80
## 0.01245924 0.23738336
Advantages and disadvantages
Advantages
- Each feature is weighted by its estimated effect on the outcome; irrelevant features get (almost) no weight.
- Independent of the units of the features; categorical features need no ad-hoc coding.
- The distance has a meaning on the outcome scale (difference of expected outcome, log odds ratio, log hazard ratio).
- Fully explainable:
explain_match()decomposes each distance into model terms. - The model can be checked with the usual tools
(
check_ph(), residuals,rms::validate()), and variables can be selected before the distance is used. - Fast and deterministic: computing all distances costs for cases, queries and terms.
Disadvantages
- The distance is only as good as the model. A misspecified model (wrong functional form, missing interactions, violated proportional hazards) gives a misleading distance.
- Non-linear effects and interactions must be specified by the user.
- A feature that acts only through an interaction that is not in the model gets no weight.
- With few cases or correlated features, the coefficients, and hence the weights, are unstable.
- Two levels of a factor with similar coefficients are treated as nearly identical, even if they are different in substance.
-
LogisticModelsupports binary outcomes only.
Random forests: distances from the trees
RFModel fits a random forest with
ranger (classification, regression or survival). A
forest of
trees partitions the feature space
times; each tree sends a case down to one terminal node (leaf).
Let
be the leaf of case
in tree
.
The partitions are chosen to separate the outcomes, so cases in the same
leaf have similar outcomes, and the forest finds non-linear effects and
interactions by itself.
Proximity distance
The proximity (Breiman, 2002) is the share of trees in which two cases share a leaf, and the distance is derived from it: A tiny forest of three trees shows the computation:
rf3 <- ranger::ranger(Species ~ ., iris, num.trees = 3, write.forest = TRUE, seed = 1)
cases <- iris[c(51, 53, 78, 101), -5]
leaves <- terminal_nodes(cases, rf3)
dimnames(leaves) <- list(rownames(cases), paste("tree", 1:3))
leaves## tree 1 tree 2 tree 3
## 51 19 3 15
## 53 26 9 15
## 78 26 9 14
## 101 8 10 10
# proximity of case 51 and case 53: share of trees with the same leaf
mean(leaves["51", ] == leaves["53", ])## [1] 0.3333333
round(as.matrix(proximity_distance(cases, rfObject = rf3)), 3)## 1 2 3 4
## 1 0.000 0.816 1.000 1
## 2 0.816 0.000 0.577 1
## 3 1.000 0.577 0.000 1
## 4 1.000 1.000 1.000 0
Out-of-bag and RF-GAP proximities
A tree is grown on a bootstrap sample until its leaves are small, so
cases that were used to grow the tree (in-bag) tend to share
leaves with each other. For training cases, the original proximity is
therefore too optimistic. Two variants avoid this
(set_distance_method("Proximity", proximity_type = ...)):
- OOB: only trees in which both cases are out-of-bag are counted.
- RF-GAP (Rhodes, Cutler & Moon, 2023): for a query and a training case , where are the trees in which is out-of-bag (all trees for new data), is the in-bag count of in tree , and is the total in-bag count of the leaf of .
The RF-GAP proximities of a query sum to one over the training cases, and the proximity-weighted mean of the training outcomes is the forest’s prediction. Retrieval with RF-GAP therefore uses exactly the notion of similarity of the forest’s predictions. Because the proximities are small, RF-GAP distances lie close to 1; only their order matters.
Depth distance
The proximity is all-or-nothing: two cases in neighbouring leaves count as far apart as two cases at opposite ends of the tree. The depth distance (Englund & Verikas, 2012) counts the edges between the leaves of the two cases, i.e. the sum of their distances to their deepest common ancestor, averaged over the trees: In this tree, , and , while the proximity only knows that shares a leaf with none of them:
root
/ \
n1 n2
/ \ / \
n3 C D E
/ \
A B
The finer resolution matters for retrieval. For a query, many training cases share no leaf with it at all: they are tied at proximity distance 1, and their order is arbitrary. The depth distance still ranks them:
set.seed(1)
rf <- RFModel$new(Species ~ ., iris[-51, ], num.trees = 100)
rf$fit()
d_depth <- rf$calc_distance_matrix(iris[51, ])[, 1]
rf$set_distance_method("Proximity")
d_prox <- rf$calc_distance_matrix(iris[51, ])[, 1]
c(cases_at_maximal_proximity_distance = sum(d_prox == 1),
distinct_proximity_distances = length(unique(d_prox)),
distinct_depth_distances = length(unique(d_depth)))## cases_at_maximal_proximity_distance distinct_proximity_distances
## 73 36
## distinct_depth_distances
## 71
The depth distance is the default of RFModel.
Explaining a forest match
There are no coefficients, but the paths of two cases through a tree
diverge at one split. explain_match() counts the split
variables at which the paths diverge over the trees; attribute
same_leaf is the proximity.
rf$set_distance_method("Depth")
knitr::kable(rf$explain_match(iris[51, ], iris[78, ]), digits = 3)| variable | n_trees | share |
|---|---|---|
| Petal.Length | 52 | 0.642 |
| Petal.Width | 25 | 0.309 |
| Sepal.Length | 2 | 0.025 |
| Sepal.Width | 2 | 0.025 |
Advantages and disadvantages
Advantages
- No model specification: non-linear effects and interactions are found automatically.
- Mixed feature types, any monotone transformation of a feature gives the same forest.
- RF-GAP retrieves exactly the cases the forest’s prediction is based on.
Disadvantages
- The distance has no unit and no interpretation on the outcome scale; explanations are counts of split variables, not effects.
- Trees split more often on features with many possible split points (Strobl et al., 2007), so continuous features, including irrelevant ones, get much weight in the distance, especially on small data sets (see Comparing the Approaches).
- It depends on the random seed and on tuning parameters
(
num.trees,mtry,min.node.size). - The original proximity is biased for training cases (OOB and RF-GAP fix this) and coarse (many ties); RF-GAP distances are all close to 1.
- More expensive: for trees (typically hundreds), and the in-bag counts take memory.
- OOB and RF-GAP proximities are tied to the cases the forest was
grown on: after
add_cases()orremove_cases(), the forest must be refitted.
Gradient boosting: distances in SHAP space
Why the forest approach does not carry over
A boosted model (BoostModel, fitted with
xgboost) is also an ensemble of trees, but a different
one. The trees are fitted one after another, each to the errors of the
previous ones, and added up:
where
is the value of the leaf of
in tree
and
the learning rate. The trees are small, and they are not exchangeable:
the first trees capture the main effects, the last ones small
corrections or noise. Counting shared leaves, as the proximity does,
would weight every tree equally and ignore the leaf values.
SHAP values as contributions
Instead, BoostModel uses the additive structure of the
prediction. SHAP values (Lundberg et al., 2020) split the prediction of
a case into one contribution per feature,
where
is the average prediction and
is the contribution of feature
,
computed exactly for trees (TreeSHAP). The contributions are on the
margin scale of the model: the outcome for regression, the log odds for
classification, the log relative hazard for the Cox objective. The
distance is the
distance of the SHAP vectors:
This is the contribution-space distance
of the regression models, with the features as terms. It has the same
interpretation:
,
so for the Cox objective
bounds the hazard ratio of the two cases. For a factor, the SHAP values
of its dummy columns are summed; for a multi-class model, the SHAP
values of all classes are used.
The link to the regression distance
For a linear model
with independent features, the SHAP values are
,
and
which is exactly the weighted distance
of Dippon et al. (2002). The SHAP distance therefore generalises the
regression distance to models that learn non-linear effects and
interactions by themselves. With a linear booster,
BoostModel reproduces LinearModel:
fml_iris <- Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width
lin <- LinearModel$new(fml_iris, iris)
lin$fit()
lin_boost <- BoostModel$new(fml_iris, iris, nrounds = 2000,
params = list(booster = "gblinear", eta = 1, lambda = 0, alpha = 0,
updater = "shotgun", feature_selector = "cyclic"))
lin_boost$fit()
max(abs(lin$calc_distance_matrix(iris[1:5, ]) - lin_boost$calc_distance_matrix(iris[1:5, ])))## [1] 2.185652e-05
With trees (the default), the SHAP values of a feature are step functions of the feature and may depend on the other features. For the two patients from above:
boost <- BoostModel$new(Surv(time, status) ~ age + sex + ph.ecog, lung2,
nrounds = 100, params = list(eta = 0.05, max_depth = 2))
boost$fit()
phi <- boost$shap_values(pair)
phi## age sex ph.ecog
## [1,] 0.1270603 -0.2169538 0.63126487
## [2,] 0.9718791 0.1984745 -0.05248616
## attr(,"bias")
## [1] 0.002923822
## [1] 0.5442952 1.1207913
knitr::kable(boost$explain_match(pair[1, ], pair[2, ]), digits = 3)| term | query_contribution | case_contribution | distance | share |
|---|---|---|---|---|
| age | 0.127 | 0.972 | 0.845 | 0.435 |
| ph.ecog | 0.631 | -0.052 | 0.684 | 0.352 |
| sex | -0.217 | 0.198 | 0.415 | 0.214 |
## distance difference_of_log_hazards
## 1.9439981 0.5764961
The distance is much larger than the difference of the predicted log hazards: as in the Cox model, the patients’ differences partly cancel in the prediction, and the distance keeps them apart.
Advantages and disadvantages
Advantages
- Non-linear effects and interactions are learned, as with a forest, but the distance keeps the meaning of the regression distance: it bounds the difference of the predictions on the outcome, log-odds or log-hazard scale.
- Explanations per feature, in the same form as for the regression models; for a linear model, the regression distance is a special case.
- Retrieval is cheap: the SHAP values are computed once per case, and the distance costs . New cases need no refit.
- Deterministic without row or column subsampling.
Disadvantages
- The SHAP values are step functions: a small difference that crosses a split counts fully, a large one within a leaf not at all.
- SHAP values share interaction effects between the features involved, so two cases can have similar SHAP values from different feature values.
- The distance inherits the boosted model’s overfitting: on small data sets, irrelevant features get weight, and the neighbourhoods are less stable under resampling than for the other distances (see Comparing the Approaches). The model must be tuned and regularised.
- Needs the suggested package xgboost.
Tuning. Every split of the model is part of the
distance, so choose the number of rounds and the depth by
cross-validation, not by default. A model with many rounds fits splits
in irrelevant features, and those splits become distance.
xgboost::xgb.cv() with early stopping does this on a design
matrix with the same features:
X <- model.matrix(~ age + sex + ph.ecog - 1, lung2)
label <- ifelse(lung2$status == 1, lung2$time, -lung2$time) # Cox: censored < 0
set.seed(1)
cv <- xgboost::xgb.cv(params = list(objective = "survival:cox", eta = 0.05,
max_depth = 2, nthread = 1),
data = xgboost::xgb.DMatrix(X, label = label),
nrounds = 1000, nfold = 5, early_stopping_rounds = 20,
verbose = 0)
nrounds <- which.min(cv$evaluation_log$test_cox_nloglik_mean)
nrounds## [1] 28
boost_tuned <- BoostModel$new(Surv(time, status) ~ age + sex + ph.ecog, lung2,
nrounds = nrounds,
params = list(eta = 0.05, max_depth = 2))
boost_tuned$fit()Repeat this for max_depth from 1 to 3 and keep the best.
On small data sets like this one, cross-validation itself is noisy; the
distance then stays unstable even when tuned.
The Gower distance: a model-free baseline
The Gower (1971) distance of two cases is a weighted mean of per-variable distances in : where if feature is missing in one of the cases and 1 otherwise, and are user-given weights (default 1). By hand, for the two patients from above:
gower <- GowerModel$new(Surv(time, status) ~ age + sex + ph.ecog, lung2)
gower$fit()
R_age <- diff(range(lung2$age)); R_ecog <- diff(range(lung2$ph.ecog))
by_hand <- c(age = abs(pair$age[1] - pair$age[2]) / R_age,
sex = as.numeric(pair$sex[1] != pair$sex[2]),
ph.ecog = abs(pair$ph.ecog[1] - pair$ph.ecog[2]) / R_ecog)
mean(by_hand)## [1] 0.7571059
gower_distance(pair[, c("age", "sex", "ph.ecog")], ranges = gower$model_fit$ranges)## 1
## 2 0.7571059
knitr::kable(gower$explain_match(pair[1, ], pair[2, ]), digits = 3)| variable | query_value | case_value | weight | distance | share |
|---|---|---|---|---|---|
| sex | female | male | 1 | 0.333 | 0.440 |
| ph.ecog | 2 | 0 | 1 | 0.222 | 0.294 |
| age | 56 | 82 | 1 | 0.202 | 0.266 |
The two patients that the Cox model found to be equally at risk are far apart for both distances; but the Gower distance weights the sex difference (1) as much as a difference over the full age range, without knowing that sex has a smaller effect on survival than ECOG.
Advantages
- No model and no outcome needed: works for exploratory retrieval and as a sanity check of the model-derived distances.
- Transparent, deterministic, handles missing values pair by pair.
- Weights can encode expert knowledge.
Disadvantages
- All features count equally unless weighted by hand. Irrelevant or noise features dilute the distance (see the benchmark).
- Numeric differences are scaled by the range, so a single outlier compresses all other differences.
- No interpretation on the outcome scale.
Reuse: predictions from the retrieved cases
Let
be the
nearest cases of query
and
their distances. With weighted = TRUE, case
gets the tricube weight
so that close cases count more and the
farthest of the
cases still counts a little; otherwise
.
predict_outcome() predicts
- classes: , and the class with the largest ;
- numeric outcomes: the weighted mean .
For survival endpoints, predict_survival() computes the
(weighted) Kaplan–Meier estimate of the
nearest cases (Lowsky et al., 2013):
The number of cases
trades bias against variance: few cases give noisy predictions, many
cases include cases that are not similar. It should be chosen on
held-out data with evaluate() /
evaluate_survival().
get_counterfactual_cases() reuses the case base in a
different way: it returns the nearest cases with a different
outcome (Keane & Smyth, 2020). Together with
explain_match(), they show what distinguishes the query
from cases that turned out differently.
Revise: evaluating the predictions
evaluate() and evaluate_survival() score
the predictions for
test cases:
| Endpoint | Measure | Definition | Better |
|---|---|---|---|
| class | accuracy | higher | |
| class | Brier score | lower | |
| class | log loss | lower | |
| numeric | RMSE, MAE | , | lower |
| survival | Uno’s C | concordance of the risk with the observed times, weighted for censoring (Uno et al., 2011) | higher |
| survival | IBS | lower |
with the censoring-weighted Brier score (Graf et al., 1999) where is the Kaplan–Meier estimate of the censoring distribution of the training data. A Brier score of 0.25 is what an uninformative prediction of 50% achieves.
Retain: maintaining the case base
add_cases() and remove_cases() change the
case base. Regression models and the Gower distance do not need to be
refitted: the distance of new cases is computed with the fitted
coefficients (ranges); refit with refit = TRUE when the
case base has changed a lot.
assess_cases() judges each case
by its
nearest other cases
(leave one out). Case
solves case
if
and both have the same outcome (same class; for numeric outcomes
tolerance; for survival outcomes the same event status at
horizon). With the reachability set
and the coverage set
:
- noisy (Wilson, 1972): the majority of (the mean, for numeric outcomes) disagrees with . Noisy cases are mislabelled or exceptional; removing them usually improves predictions.
- pivotal (Smyth & Keane, 1995): . No other case solves ; removing it loses competence.
- auxiliary: some covers everything covers, . The case is redundant and can be removed to keep the case base small.
assessment <- cox$assess_cases(k = 10, horizon = 365)
table(category = assessment$category, noisy = assessment$noisy, useNA = "ifany")## noisy
## category FALSE TRUE <NA>
## pivotal 0 1 0
## auxiliary 95 57 0
## other 7 12 0
## <NA> 0 0 41
Cases censored before the horizon have no known outcome and are not
assessed (NA). Most cases are auxiliary: the case base is
redundant, as is typical. Noisy cases are the patients whose survival
differs from that of similar patients.
Choosing an approach
| Regression (Cox, linear, logistic) | Boosting (SHAP) | Random forest (depth, proximity, RF-GAP) | Gower | |
|---|---|---|---|---|
| Weights the features by | estimated effect on the outcome | learned effect on the outcome | number of splits (favours continuous features) | scale (equal or user weights) |
| Irrelevant features | small weight, shrinking with more cases | substantial weight on small data | substantial weight on small data | full weight |
| Needs an outcome | yes | yes | yes | no |
| Non-linear effects, interactions | if specified (splines, *) |
automatic | automatic | no |
| Distance unit | outcome scale (log HR, log OR, ) | outcome scale (margin) | none | share of features |
| Explanation | contribution per term | SHAP value per feature | split variables where paths diverge | per-feature difference |
| Assumptions | model correctly specified (e.g. PH) | objective (e.g. PH); tuning | few | none |
| Deterministic | yes | yes (no subsampling) | no (seed) | yes |
| Cost per pair | number of terms | number of features | number of trees | number of features |
| Retain without refitting | yes | yes | depth and original proximity: yes; OOB, RF-GAP: no | yes |
Some rules of thumb:
- Start with the regression model when the outcome is well described by a regression model, or when the distance must be explained and defended (e.g. to clinicians). Check the model first; the distance inherits its assumptions.
- Use gradient boosting with the SHAP distance when the relationships are complex but the distance should keep a meaning on the outcome scale and be explained per feature. Regularise the model and check the stability of the neighbours.
- Use a random forest when the relationships are complex or unknown, when there are many features, or when the regression model does not fit well. Prefer RF-GAP when the retrieved cases should explain the forest’s prediction, the depth distance for a finer ranking of the neighbours.
- Use the Gower distance as a baseline, when there is no outcome, or when the features were chosen by experts and are all relevant.
-
Compare them on held-out data with
evaluate()/evaluate_survival(). In the benchmark article, the predictive performance of the distances is similar; with irrelevant features, the Gower distance loses the most accuracy.
References
- Aamodt, A. and Plaza, E. (1994). Case-based reasoning: Foundational issues, methodological variations, and system approaches. AI Communications, 7(1), 39–59.
- Breiman, L. (2002). Manual on setting up, using, and understanding random forests V3.1.
- Dippon, J. et al. (2002). A statistical approach to case based reasoning, with application to breast cancer data. Computational Statistics & Data Analysis, 40(3), 579–602.
- Englund, C. and Verikas, A. (2012). A novel approach to estimate proximity in a random forest: An exploratory study. Expert Systems with Applications, 39(17), 13046–13050.
- Gower, J. C. (1971). A general coefficient of similarity and some of its properties. Biometrics, 27(4), 857–871.
- Graf, E. et al. (1999). Assessment and comparison of prognostic classification schemes for survival data. Statistics in Medicine, 18(17–18), 2529–2545.
- Keane, M. T. and Smyth, B. (2020). Good counterfactuals and where to find them. ICCBR 2020, LNCS 12311, 163–178.
- Lundberg, S. M. et al. (2020). From local explanations to global understanding with explainable AI for trees. Nature Machine Intelligence, 2, 56–67.
- Lowsky, D. J. et al. (2013). A K-nearest neighbors survival probability prediction method. Statistics in Medicine, 32(12), 2062–2069.
- Rhodes, J. S., Cutler, A. and Moon, K. R. (2023). Geometry- and accuracy-preserving random forest proximities. IEEE TPAMI, 45(9), 10947–10959.
- Strobl, C., Boulesteix, A.-L., Zeileis, A. and Hothorn, T. (2007). Bias in random forest variable importance measures. BMC Bioinformatics, 8, 25.
- Smyth, B. and Keane, M. T. (1995). Remembering to forget: A competence-preserving case deletion policy for case-based reasoning systems. Proceedings of IJCAI-95, 377–382.
- Uno, H. et al. (2011). On the C-statistics for evaluating overall adequacy of risk prediction procedures with censored survival data. Statistics in Medicine, 30(10), 1105–1117.
- Wilson, D. L. (1972). Asymptotic properties of nearest neighbor rules using edited data. IEEE Transactions on Systems, Man, and Cybernetics, 2(3), 408–421.