Case Based Reasoning
Overview
Case-based reasoning is a problem-solving methodology that involves solving a new problem by referring to the solution of a similar problem in a large set of previously solved problems. The key aspect of Case Based Reasoning is to determine the problem that "most closely" matches the new problem at hand. This is achieved by defining a family of distance functions and using these distance functions as parameters for local averaging regression estimates of the final result. The optimal distance function is chosen based on a specific error measure used in regression estimation. This approach allows for efficient problem-solving by leveraging past experiences and adapting solutions from similar cases. The underlying concept is inspired by the work of Dippon J. et al. (2002) doi:10.1016/S0167-9473(02)00058-0.
Breaking changes
- Redesigned API: snake_case function names (
distance_random_forest,weighted_distance,terminal_nodes,as_dist_object). Old camelCase names still work but emit deprecation warnings. - R6 field names changed to snake_case (
endpoint,dist_matrix,order_matrix). Old names emit deprecation warnings. - S3 generics added:
predict(),print(),summary()for all model classes.
Bug fixes
- Fix off-by-one error in terminal node IDs for RF depth distance.
- Fix compilation on musl/Alpine Linux (no TBB fallback).
- Fix platform-dependent test failure in ordering tests.
- Replace broken URLs with stable DOI links.
Show all changes in 0.4.1Hide the rest of the changes in 0.4.1
Improvements
- Improved vignettes: added
set.seed()for reproducibility, tightened prose. - Removed archived
pryrdependency; replaced with basedo.call. - Removed
data.tabledependency. - Added CI/CD via GitHub Actions (macOS, Windows, Ubuntu).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK12 OK2026-04-25
Show 3 earlier changesHide 3 earlier changes
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 28 (1 internal)includes a package overview page
- Examples that run
- 14%1 run in a plain check · 6 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 54%
- Documented parameters
- 100%
- Return-value docs
- 54%
- Help pages citing references
- 4%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 106
- Median days to close, 50 most recently updated closed PRs
- 90
Stars over time
Forks over time
Issues over time
PRs over time
5 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/sipemu/case-based-reasoning on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-02-19Commits: at least 13 crediting it in the message
- Claude Opus 4.613 commits · Feb 2026
Dependencies
Installing CaseBasedReasoning adds 66 packages (37 with compiled code, 71 MB of source tarballs). Heaviest: stringi 11 MB, TH.data 8.2 MB, ggplot2 6.0 MB.
Code & Tests
People & History
Maintainer since 0.1 (2018)
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 0.4.1Latest
- unarchivedReturned to CRAN2026-02-26
- 0.42026-02-26 · diff ↗ ·
added 4 exports
as_dist_object, distance_random_forest, terminal_nodes, weighted_distance - archivedRemoved from CRAN2026-01-30requires archived package 'pryr'
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- unarchivedReturned to CRAN2023-05-02
- 0.32023-05-02 · diff ↗ ·
removed 7 exports
%>%, CoxBetaModel, depthMatrix, distanceTerminalNodes, forestToMatrix, proximityMatrix, terminalNodeIDsadded 9 exports
CoxModel, LinearModel, LogisticModel, depth_distance, edges_between_terminal_nodes, generate_grid, proximity_distance, ranger_forests_to_matrix, terminalNodes - RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- archivedRemoved from CRAN2019-10-01installation issues were not corrected in time
- RR 3.6.0 released · 2019-04-26
- 0.12018-06-12
Show 1 earlier eventHide 1 earlier event
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2018-06-12
- Total releases
- 4 / 8 yrs
- License
- MIT + file LICENSE OSI · relicensed from AGPL in 0.3
- Download size
- 285 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("CaseBasedReasoning")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.