Learn R Programming

Clustering (version 1.7.7)

sort.clustering: 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 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.

Value

Another clustering object with the evaluation measures sorted

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.

Examples

Run this code
# NOT RUN {
library(Clustering)

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

sort(result, FALSE, 'Recall')

# }

Run the code above in your browser using DataLab