sort.clustering: Returns the clustering result sorted by a set of metrics.
Description
This function receives a clustering object and sorts the
indicator columns by parameter.
By default it performs sorting by the algorithm field.
Usage
# S3 method for clustering
sort(x, decreasing = TRUE, ...)
Arguments
x
is 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, Dataset, Ranking, timeExternal, entropy, variation_information,
precision, recall, f_measure, fowlkes_mallows_index, connectivity, dunn,
silhouette, timeInternal.
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, Dataset, Ranking, timeExternal, entropy,
variation_information, precision, recall, f_measure, fowlkes_mallows_index,
connectivity, dunn, silhouette, timeInternal.
# NOT RUN {library(Clustering)
result <-
clustering(df = cluster::agriculture,min = 4, max = 4,algorithm='gmm',
metrics='recall')
sort(result, FALSE, 'recall')
# }