clsSpecifyBase: Specify New TURN-RES Base by Agglomerating Existing Clusters

Description Usage Arguments Details Value Author(s) Examples

Description

A helper function which creates a base for a new TURN-RES iteration. This function will agglomerate specified clusters and return a cluster membership vector that can be used in the base.cls argument in clsTurnRes.

Usage

1
clsSpecifyBase(x, clusters, trim = 0.05)

Arguments

x

a cTurn object containing the clustering to be used.

clusters

a vector the same length as the number of clusters k of x which acts as an agglomeration map. For example, if x has 5 clusters, the vector c(1,2,1,3,3) would agglomerate both the first and third cluster and the fourth and fifth cluster, leaving the second as is.

trim

optional Specifies whether the existing clusters are to be trimmed. By default, this value is set to 0.05, which will trim 0.025 quantiles off either end of each cluster in every dimension. Clearly setting this parameter to 0 will remove this feature.

Details

This is designed to be used with the base.cls argument of a cTurn object. Hence trimming each cluster can be helpful if some of the edge datapoints are not representative of the rest of the cluster.

Value

A vector corresponding to a grouped and trimmed version of the cluster membership vector of a cTurn object.

Author(s)

Alex Bird, alex.bird@boots.co.uk

Examples

1
2
x = rnorm(30,0,1);
mean(x) #approx 0.5. Nothing to do with this!

ornithos/nectr documentation built on May 24, 2019, 3:57 p.m.