cv_voting: For a 'survClust' fit, return consolidated labels across...

View source: R/cv_voting.R

cv_votingR Documentation

For a survClust fit, return consolidated labels across rounds of cross validation for a specific k. Note that cv.fit already has consolidated class labels across folds

Description

For a survClust fit, return consolidated labels across rounds of cross validation for a specific k. Note that cv.fit already has consolidated class labels across folds

Usage

cv_voting(
  cv.fit,
  dat.dist,
  pick_k,
  cmd.k = NULL,
  pick_k.test = TRUE,
  minlabel.test = TRUE
)

Arguments

cv.fit

fit objects as returned from cv_survclust

dat.dist

weighted distance matrices from getDist

pick_k

choice of k cluster to summarize over rounds of cross validation

cmd.k

number of dimensions used by cmdscale to perform clustering on. Defaults is n-1

pick_k.test

logical, only selects cv.fit solutions where the resulting solution after consolidation contains pick_k classes. Default TRUE. Avoids edge cases, but in some cases FALSE might be desirable

minlabel.test

logical, only selects cv.fit solutions where classes have a minimum of 5 samples. Default TRUE. Avoids edge cases, but in some cases FALSE might be desirable

Value

final.labels consolidated class labels over rounds of cross-validation

Author(s)

Arshi Arora

Examples

library(survClust)
k4 <- cv_voting(uvm_survClust_cv.fit, getDist(uvm_dat, uvm_survdat), pick_k = 4)
table(k4)


arorarshi/survClust documentation built on April 21, 2024, 1:51 p.m.