RFModel {CaseBasedReasoning} | R Documentation |
RandomForest Model for Searching Similar Cases
RandomForest Model for Searching Similar Cases
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.
CaseBasedReasoning::CBRBase
-> RFModel
model
the statistical model
model_params
model arguments
dist_method
Distance method
print()
Prints information of the initialized object
RFModel$print()
new()
Initialize a RandomForest object for searching similar cases.
RFModel$new(formula, data, ...)
formula
Object of class formula or character describing the model fit.
data
Training data of class data.frame
...
ranger RandomForest arguments
fit()
Fit the RandomForest
RFModel$fit()
x
Training data of class data.frame
set_distance_method()
Set the distance method. Available are Proximity and Depth
RFModel$set_distance_method(method = "Depth")
method
Distance calculation method (default: Proximity)
clone()
The objects of this class are cloneable with this method.
RFModel$clone(deep = FALSE)
deep
Whether to make a deep clone.
Englund and Verikas. A novel approach to estimate proximity in a random forest: An exploratory study.