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 type = kdba for convenience!
centers: type of center to determine, either centroids (default) where an average profile is computed for each cluster or medoids where the index of the medoid profile is identified
distmat: a precomputed distance matrix of class dist (only used if centers = medoids)
keepSPx: append the snowprofileSet to the output?
Returns
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)
Examples
this_example_runs_too_long <-TRUEif(!this_example_runs_too_long){# exclude from cran checks cl_kdba <- clusterSPkdba(SPgroup2, k =2) plot(cl_kdba)}