Cluster observation data using a given metric.
Clusters the original observations in the n-by-m data matrix X (n observations in m dimensions), using the euclidean distance metric to calculate distances between original observations, performs hierarchical clustering using the single linkage algorithm, and forms flat clusters using the inconsistency method with t as the cut-off threshold.
A one-dimensional array T of length n is returned. T[i] is the index of the flat cluster to which the original observation i belongs.
Parameters : | X : (N, M) ndarray
t : float
criterion : str, optional
metric : str, optional
depth : int, optional
method : str, optional
R : ndarray, optional
|
---|---|
Returns : | fclusterdata : ndarray
|
Notes
This function is similar to the MATLAB function clusterdata.