ob.stability {bootcluster} | R Documentation |
Estimate the stability of a clustering based on non-parametric bootstrap out-of-bag scheme, with option for subsampling scheme
Description
Estimate the stability of a clustering based on non-parametric bootstrap out-of-bag scheme, with option for subsampling scheme
Usage
ob.stability(x, k, B = 500, r = 5, subsample = FALSE, cut_ratio = 0.5)
Arguments
x |
|
k |
number of clusters for which to estimate the stability |
B |
number of bootstrap re-samples |
r |
integer parameter in the kmeansCBI() funtion |
subsample |
logical parameter to use the subsampling scheme option in the resampling process (instead of bootstrap) |
cut_ratio |
numeric parameter between 0 and 1 for subsampling scheme training set ratio |
Details
This function estimates the stability through out-of-bag observations It estimate the stability at the (1) observation level, (2) cluster level, and (3) overall.
Value
membership
vector
of membership for each observation from the reference clusteringobs_wise
vector
of estimated observation-wise stabilityclust_wise
vector
of estimated cluster-wise stabilityoverall
numeric
estimated overall stabilitySmin
numeric
estimated Smin through out-of-bag scheme
Author(s)
Tianmou Liu
References
Bootstrapping estimates of stability for clusters, observations and model selection. Han Yu, Brian Chapman, Arianna DiFlorio, Ellen Eischen, David Gotz, Matthews Jacob and Rachael Hageman Blair.
Examples
set.seed(123)
data(iris)
df <- data.frame(iris[,1:4])
# You can choose to scale df before clustering by
# df <- scale(df)
ob.stability(df, k = 2, B=500, r=5)