| tidyclust-package | R Documentation |
The tidyclust package provides a tidy, unified interface to clustering models, following the same design patterns as parsnip. It creates a consistent API across different clustering functions and engines.
k_means(): K-means clustering (stats, ClusterR, klaR, clustMixType
engines)
hier_clust(): Hierarchical/agglomerative clustering (stats engine)
db_clust(): Density-based clustering (dbscan engine)
gm_clust(): Gaussian mixture model clustering (mclust engine)
Fitting: fit(), fit_xy()
Prediction: predict.cluster_fit()
Extraction: extract_centroids(), extract_cluster_assignment()
Metrics: silhouette_avg(), sse_within_total(), sse_ratio()
Tuning: tune_cluster()
# Create a specification spec <- k_means(num_clusters = 3) # Fit to data fit <- fit(spec, ~., data = mtcars) # Extract results extract_centroids(fit) extract_cluster_assignment(fit)
Maintainer: Emil Hvitfeldt emil.hvitfeldt@posit.co (ORCID)
Authors:
Emil Hvitfeldt emil.hvitfeldt@posit.co (ORCID)
Kelly Bodwin kelly@bodwin.us
Other contributors:
Posit Software, PBC (ROR) [copyright holder, funder]
Package website: https://tidyclust.tidymodels.org/
Bug reports: https://github.com/tidymodels/tidyclust/issues
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.