Description Usage Arguments Value
View source: R/clustering_algorithms.R
This function performs hierarchical clustering in either average, complete or single linkage.
1 2 | myHierarchicalClustering(X, k, distance = "euclidean",
linkage = "average")
|
X |
data matrix or data frame of size n x d, n observations and d features |
k |
number of clusters |
distance |
character for the type of distance. Default is "euclidean" |
linkage |
"single", "average" or "complete" |
list of 3 components:
cluster
vector of integer between 1 and k containing the allocation of each point
centers
matrix (d x k) of the centers of each cluster
predict
function predicting to which cluster an observation belongs. The prediciton is done with the k-nearest neighbours function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.