This function performs non-hierarchical clustering based on dissimilarity using partitioning around medoids, implemented via the Clustering Large Applications based on RANdomized Search (CLARANS) algorithm.
Arguments
- dissimilarity
The output object from
dissimilarity()orsimilarity_to_dissimilarity(), or adistobject. If adata.frameis used, the first two columns should represent pairs of sites (or any pair of nodes), and the subsequent column(s) should contain the dissimilarity indices.- index
The name or number of the dissimilarity column to use. By default, the third column name of
dissimilarityis used.- seed
A value for the random number generator (
NULLfor random initialization by default).- n_clust
An
integervector or a singleintegerspecifying the desired number(s) of clusters.- numlocal
An
integerdefining the number of local searches to perform.- maxneighbor
A positive
numericvalue defining the maximum number of neighbors to consider for each local search.- algorithm_in_output
A
booleanindicating whether the original output of fastclarans should be included in the output. Defaults toTRUE(see Value).
Value
A list of class bioregion.clusters with five components:
name: A
characterstring containing the name of the algorithm.args: A
listof input arguments as provided by the user.inputs: A
listof characteristics of the clustering process.algorithm: A
listof all objects associated with the clustering procedure, such as original cluster objects (only ifalgorithm_in_output = TRUE).clusters: A
data.framecontaining the clustering results.
If algorithm_in_output = TRUE, the algorithm slot includes the output of
fastclarans.
Details
Based on fastkmedoids package (fastclarans).
References
Schubert E & Rousseeuw PJ (2019) Faster k-Medoids Clustering: Improving the PAM, CLARA, and CLARANS Algorithms. Similarity Search and Applications 11807, 171-187.
See also
For more details illustrated with a practical example, see the vignette: https://biorgeo.github.io/bioregion/articles/a4_2_non_hierarchical_clustering.html.
Associated functions: nhclu_clara nhclu_dbscan nhclu_kmeans nhclu_pam nhclu_affprop
Author
Pierre Denelle (pierre.denelle@gmail.com)
Boris Leroy (leroy.boris@gmail.com)
Maxime Lenormand (maxime.lenormand@inrae.fr)