RandomForest Model for Searching Similar Cases
RandomForest Model for Searching Similar Cases
CaseBasedReasoning::CBRBase -> RFModel
modelthe statistical model
model_paramsmodel arguments
dist_methodDistance method
new()Initialize a RandomForest object for searching similar cases.
RFModel$new(formula, data, ...)formulaObject of class formula or character describing the model fit.
dataTraining data of class data.frame
...ranger RandomForest arguments
fit()Fit the RandomForest
RFModel$fit()xTraining data of class data.frame
set_distance_method()Set the distance method. Available are Proximity and Depth
RFModel$set_distance_method(method = "Depth")methodDistance calculation method (default: Proximity)
clone()The objects of this class are cloneable with this method.
RFModel$clone(deep = FALSE)deepWhether to make a deep clone.
This class uses the proximity or depth matrix of the RandomForest algorithm as a similarity matrix of training and query observations. By default all cases with at least one missing values are dropped from learning, calculating the distance matrix and searching for similar cases.
Englund and Verikas. A novel approach to estimate proximity in a random forest: An exploratory study.