RFCLUST
performs Random Forests of Divisive Monothetic
(divclust
) Trees for
Unsupervised Clustering.
You can install the development version of RFCLUST from GitHub.
RFCLUST
depends on a custopmized implementation of the
divclust
package, that must
first be installed with the following:
# install.packages("remotes")
remotes::install_github("Alar0g/divclust")
Then, RFCLUST
can be installed with:
remotes::install_github("Alar0g/RFCLUST")
library(RFCLUST)
#> Loading required package: parallel
#> Registered S3 method overwritten by 'GGally':
#> method from
#> +.gg ggplot2
library(palmerpenguins)
mypeng <- as.data.frame(penguins)
mypeng$year <- factor(as.character(mypeng$year),
levels=c("2007", "2008", "2009"),
ordered=TRUE)
forest_clust <- rfclust(na.omit(mypeng[mypeng$sex=="male", -c(1, 7)]), ntrees = 50, ncores = 1)
#> We advise you do use the `summary()` on this object to agregate the result of this forest, before plotting the summary itself.
resume <- summary(forest_clust)
plot(resume)