hclu_optics {bioregion} | R Documentation |
OPTICS hierarchical clustering algorithm
Description
This function performs semi-hierarchical clustering on the basis of dissimilarity with the OPTICS algorithm (Ordering Points To Identify the Clustering Structure)
Usage
hclu_optics(
dissimilarity,
index = names(dissimilarity)[3],
minPts = NULL,
eps = NULL,
xi = 0.05,
minimum = FALSE,
show_hierarchy = FALSE,
algorithm_in_output = TRUE,
...
)
Arguments
dissimilarity |
the output object from |
index |
name or number of the dissimilarity column to use. By default,
the third column name of |
minPts |
a |
eps |
a |
xi |
a |
minimum |
a |
show_hierarchy |
a |
algorithm_in_output |
a |
... |
you can add here further arguments to be passed to |
Details
The OPTICS (Ordering points to identify the clustering structure) is a
semi-hierarchical clustering algorithm which orders the points in the
dataset such that points which are closest become neighbors, and calculates
a reachability distance for each point. Then, clusters can be extracted in a
hierarchical manner from this reachability distance, by identifying clusters
depending on changes in the relative cluster density. The reachability plot
should be explored to understand the clusters and their hierarchical nature,
by running plot on the output of the function
if algorithm_in_output = TRUE
: plot(object$algorithm)
.
We recommend reading (Hahsler et al. 2019) to grasp the
algorithm, how it works, and what the clusters mean.
To extract the clusters, we use the extractXi function which is based on the steepness of the reachability plot (see optics)
Value
A list
of class bioregion.clusters
with five slots:
name:
character
containing the name of the algorithmargs:
list
of input arguments as provided by the userinputs:
list
of characteristics of the clustering processalgorithm:
list
of all objects associated with the clustering procedure, such as original cluster objectsclusters:
data.frame
containing the clustering results
In the algorithm
slot, if algorithm_in_output = TRUE
, users can
find the output of optics.
Author(s)
Boris Leroy (leroy.boris@gmail.com), Pierre Denelle (pierre.denelle@gmail.com) and Maxime Lenormand (maxime.lenormand@inrae.fr)
References
Hahsler M, Piekenbrock M, Doran D (2019). “Dbscan: Fast density-based clustering with R.” Journal of Statistical Software, 91(1). ISSN 15487660.
See Also
Examples
dissim <- dissimilarity(fishmat, metric = "all")
clust1 <- hclu_optics(dissim, index = "Simpson")
clust1
# Visualize the optics plot (the hierarchy of clusters is illustrated at the
# bottom)
plot(clust1$algorithm)
# Extract the hierarchy of clusters
clust1 <- hclu_optics(dissim, index = "Simpson", show_hierarchy = TRUE)
clust1