sort.clustering function

Returns the clustering result sorted by a set of metrics.

Returns the clustering result sorted by a set of metrics.

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

## 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.

Returns

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

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