Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rfClustering

Random forest based clustering


Description

Creates a clustering of random forest training instances. Random forest provides proximity of its training instances based on their out-of-bag classification. This information is usually passed to visualizations (e.g., scaling) and attribute importance measures.

Usage

rfClustering(model, noClusters=4)

Arguments

model

a random forest model returned by CoreModel

noClusters

number of clusters

Details

The method calls pam function for clustering, initializing its distance matrix with random forest based similarity by calling rfProximity with argument model.

Value

An object of class pam representing the clustering (see ?pam.object for details), the most important being a vector of cluster assignments (named cluster) to training instances used to generate the model.

Author(s)

John Adeyanju Alao (as a part of his BSc thesis) and Marko Robnik-Sikonja (thesis supervisor)

References

Leo Breiman: Random Forests. Machine Learning Journal, 45:5-32, 2001

See Also

Examples

set<-iris
md<-CoreModel(Species ~ ., set, model="rf", rfNoTrees=30, maxThreads=1)
mdCluster<-rfClustering(md, 5)

destroyModels(md) # clean up

CORElearn

Classification, Regression and Feature Evaluation

v1.56.0
GPL-3
Authors
Marko Robnik-Sikonja and Petr Savicky
Initial release
2021-03-23

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.