bqs_rank: Ranking Clusters Quadratic Scores Estimated Via Bootstrap

View source: R/bqs_rank.R

bqs_rankR Documentation

Ranking Clusters Quadratic Scores Estimated Via Bootstrap

Description

Ranks the scores of clustering methods estimated via bootstrap.

Usage

bqs_rank(bqsol, rankby = "lq", boot_na_share = 0.25)

Arguments

bqsol

an object of class bqs obtained from bqs.

rankby

character string specifying how the scored solutions are ranked. Possible values are {"lq", "mean", "1se"}. With ="lq" (default), the solutions are ranked by maximizing the estimated lower limit of the 1-alpha bootstrap confidence interval for the expected score. With ="mean", the solutions are ranked by maximizing the estimated expected score. With ="1se", the solutions are ranked by maximizing the estimated lower limit of the confidence interval for the expected score whose semi-length is equal to a standard error. The expected score's standard error is approximated using the bootstrap distribution. See Details for small-B behavior.

boot_na_share

a numeric value in [0,1]. During the bootstrapping a method's score is set to NA if the underlying computation runs into errors. Methods resulting in more than B * boot_na_share errors are excluded from the comparison.

Details

For small B, some ranking criteria may be unstable or unavailable. In particular, with B=1, "lq" is effectively equivalent to "mean", while "1se" is not computable and the corresponding ranks remain NA. For B<5 warns that "lq" and "1se" may yield imprecise estimates.

Value

An S3 object of class bqs. Output components are those of bqs. The score-summary components are re-ranked in place. Any stored best_* components are refreshed and are returned only when a rank-1 solution exists under the new ranking. See Value in bqs. The object is modified only in its ranking-related components.

References

Coraggio, Luca and Pietro Coretto (2023). Selecting the number of clusters, clustering models, and algorithms. A unifying approach based on the quadratic discriminant score. Journal of Multivariate Analysis, Vol. 196(105181), 1-20. doi: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jmva.2023.105181")}

See Also

bqs, bqs_select

Examples

# load data
data("banknote")
dat <- banknote[-1]

## set up methods
## see also help('mset_user') and related functions
KM   <- mset_kmeans(K = 3)
GMIX <- mset_gmix(K = 3, erc = c(1, 100))

# combine tuned methods
mlist <- mbind(KM, GMIX)

# perform bootstrap
# change B and ncores to a much larger value in real problems
res <- bqs(dat, mlist, B = 3, rankby = "lq", ncores = 1)
res

# now change ranking criterion
res2 <- bqs_rank(res, rankby = "mean")
res2


qcluster documentation built on June 5, 2026, 5:07 p.m.

Related to bqs_rank in qcluster...