View source: R/clusterSPkdba.R
clusterSPkdba | R Documentation |
K-dimensional barycentric average clustering for snow profiles
clusterSPkdba(
SPx,
k,
config = clusterSPconfig(type = "kdba"),
centers = "centroids",
distmat = NULL,
keepSPx = TRUE
)
SPx |
a sarp.snowprofile::snowprofileSet to be clustered |
k |
number of desired cluster numbers |
config |
a list providing the necessary hyperparameters. Use clusterSPconfig function with |
centers |
type of center to determine, either |
distmat |
a precomputed distance matrix of class dist (only used if |
keepSPx |
append the snowprofileSet to the output? |
a list of class clusterSP
containing:
clustering
: vector of integers (from 1:k) indicating the cluster to which each point is allocated
centroids
: snowprofileSet containing the centroid profile for each cluster (if calculated)
clusters_history
: matrix with history of clustering over iterations
iccentroids
: initial condition centroids
niterations
: number of iterations
converged
: did the algorithm converge?
SPx
: a copy of the input snowprofileSet (if keepSPx = TRUE
)
fherla shorton
clusterSP, clusterSPcenters
this_example_runs_too_long <- TRUE
if (!this_example_runs_too_long) { # exclude from cran checks
cl_kdba <- clusterSPkdba(SPgroup2, k = 2)
plot(cl_kdba)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.