| RFModel {CaseBasedReasoning} | R Documentation |
RandomForest Model for Searching Similar Cases
Description
RandomForest Model for Searching Similar Cases
RandomForest Model for Searching Similar Cases
Details
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.
Super class
CaseBasedReasoning::CBRBase -> RFModel
Public fields
modelthe statistical model
model_paramsmodel arguments
dist_methodDistance method
Methods
Public methods
Inherited methods
Method print()
Prints information of the initialized object
Usage
RFModel$print()
Method new()
Initialize a RandomForest object for searching similar cases.
Usage
RFModel$new(formula, data, ...)
Arguments
formulaObject of class formula or character describing the model fit.
dataTraining data of class data.frame
...ranger RandomForest arguments
Method fit()
Fit the RandomForest
Usage
RFModel$fit()
Arguments
xTraining data of class data.frame
Method set_distance_method()
Set the distance method. Available are Proximity and Depth
Usage
RFModel$set_distance_method(method = "Depth")
Arguments
methodDistance calculation method (default: Proximity)
Method clone()
The objects of this class are cloneable with this method.
Usage
RFModel$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
Englund and Verikas. A novel approach to estimate proximity in a random forest: An exploratory study.