Learn R Programming

COMMUNAL (version 1.1.0)

Choose Optimal Clustering Algorithms: Choose Optimal Clustering Algorithms

Description

These functions serve to find locally optimal clustering algorithms for an output of clusterRange. They measure the percentage of clusterings for which a given algorithm returned any clusters with minSize or fewer members.

Usage

testAlgsMinSize(clusRange, algs = "all", minSize = 3)
getGoodAlgs(clusRange, algs = "all", minSize = 3)

Arguments

clusRange
The output from a call to clusterRange.
algs
The algorithms to examine. Defaults to "all" algorithms present in clusRange, but user can define a subset (character vector).
minSize
The size at or below which a cluster is considered sub-optimal.

Value

testAlgsMinSize returns a named numeric vector of mean percentage of clusters < minSize.getGoodAlgs returns a character vector of algorithms that are at or under the mean for percent clusterings < minSize, suitable for passing into plotRange3D

Details

testAlgsMinSize iterates over the range of sub-datasets present in clusRange, and will print cluster assignment counts for all K where a cluster smaller than minSize has been returned (to help the user identify patterns in the data). This makes it quite verbose. It will then return the mean percentage of clusters < minSize for all algorithms.

getGoodAlgs is a wrapper for testAlgsMinSize that returns the algorithms that are at or under the mean for percent clusterings < minSize.

See Also

getNonCorrNonMonoMeasures

Examples

Run this code
## output from running \code{clusterRange} on data(BRCA.100)
data(BRCA.results)

## BRCA results does not have any clusters < minSize=3, so returns all.
testAlgsMinSize(BRCA.results)
getGoodAlgs(BRCA.results)

## force output, call minSize=50 (just to test here)
getGoodAlgs(BRCA.results, minSize=50)

Run the code above in your browser using DataLab