getConsensusCluster {Evacluster}R Documentation

Consensus Clustering Results

Description

This function gets the labels of the subjects that share the same connectivity.

Usage

getConsensusCluster(object, who = "training", thr = seq(0.8, 0.3, -0.1))

Arguments

object

A object of "clusterStability" function result

who

This value shows the consensus clustering result of training and testing sets. If who="training" for training set, otherwise other sets.

thr

This is the seq function with three arguments that are: initial value, final value, and increment (or decrement for a declining sequence). This produces ascending or descending sequences.

Value

A list of samples' labels with same connectivity.

Examples


library("mlbench")
data(Sonar)

Sonar$Class <- as.numeric(Sonar$Class)
Sonar$Class[Sonar$Class == 1] <- 0 
Sonar$Class[Sonar$Class == 2] <- 1

ClustStab <- clusterStability(data=Sonar, clustermethod=kmeansCluster, dimenreducmethod="UMAP",
                              n_components = 3,featureselection="yes", outcome="Class",
                              fs.pvalue = 0.05,randomTests = 100,trainFraction = 0.7,center=3)

clusterLabels <- getConsensusCluster(ClustStab,who="training",thr=seq(0.80,0.30,-0.1))


[Package Evacluster version 0.1.0 Index]