sort.clustering {Clustering}R Documentation

Returns the clustering result sorted by a set of metrics.

Description

This function receives a clustering object and sorts the columns by parameter. By default it performs sorting by the algorithm field.

Usage

## S3 method for class 'clustering'
sort(x, decreasing = TRUE, ...)

Arguments

x

It's an clustering object.

decreasing

A logical indicating if the sort should be increasing or decreasing. By default, decreasing.

...

Additional parameters as "by", a String with the name of the evaluation measure to order by. Valid values are: Algorithm, Distance, Clusters, Data, Var, Time, Entropy, Variation_information, Precision, Recall, F_measure, Fowlkes_mallows_index, Connectivity, Dunn, Silhouette and TimeAtt.

Details

The additional argument in "..." is the 'by' argument, which is a array with the name of the evaluation measure to order by. Valid value are: Algorithm, Distance, Clusters, Data, Var, Time, Entropy, Variation_information, Precision, Recall, F_measure, Fowlkes_mallows_index, Connectivity, Dunn, Silhouette, TimeAtt.

Value

Another clustering object with the evaluation measures sorted

Examples



result <-
Clustering::clustering(df = cluster::agriculture,min = 4, max = 4,algorithm='gmm',
metrics='Recall')

sort(result, FALSE, 'Recall')


[Package Clustering version 1.7.10 Index]