splitClusters: Split a cluster on the fly

View source: R/RandomUniformForestsCPP.R

splitClustersR Documentation

Split a cluster on the fly

Description

Given one (or many) cluster(s), the function splits it in two new clusters.

Usage

splitClusters(object, whichOnes, seed = 2014, ...)

Arguments

object

an object of class unsupervised.

whichOnes

a vector defining which cluster(s), given by its label, has to be split ?

seed

see unsupervised.randomUniformForest.

...

not currently used.

Value

An object of class unsupervised.

Author(s)

Saip Ciss saip.ciss@wanadoo.fr

See Also

mergeClusters, modifyClusters

Examples

## not run
## load iris data
# data(iris)

## run unsupervised modelling, removing labels and committing 2 clusters
# iris.uruf = unsupervised.randomUniformForest(iris[,-5], mtry = 1, nodesize = 2, 
# threads = 1, clusters = 2)

## view a summary
# iris.uruf

## plot clusters 
# plot(iris.uruf)

## split the cluster which has the highest count (cluster 1, in our case)
# iris.urufSplit = splitClusters(iris.uruf, 1)

## assess fitting comparing average Silhouette before and after
# iris.urufSplit

## plot to see the new clusters
# plot(iris.urufSplit) 

randomUniformForest documentation built on June 22, 2022, 1:05 a.m.