← Back to all sparks
T

tidyclust

ANALYTICS
Velocity0.0

Tidy interface for fitting and evaluating clustering models in R

tidyclust just tripled the model types it can fit, and handed finalization back to tune

tidyclustclusteringtidymodelsdbscangaussian-mixturer-package
Current state
tidyclust brings clustering into the tidymodels interface, and 0.3.0 was the release where its model coverage stopped being k-means and hierarchical clustering. DBSCAN and HDBSCAN, Gaussian mixtures, and mean shift all arrived at once as proper clustering specifications. The two releases since have been bug fixes on the metric and sparse-data paths, which is the usual pattern after a large surface addition.
Where it's heading
The package is converging with the rest of tidymodels rather than maintaining a parallel API: finalize_model_tidyclust() and finalize_workflow_tidyclust() are deprecated because tune::finalize_model() and tune::finalize_workflow() now handle cluster_spec objects natively. That removes the last place where clustering needed its own version of a shared verb. With density-based and model-based clustering now present, the interface has to cover model families with genuinely different assumptions than the centroid methods it started with.
Prediction
The recent fixes to cluster_metric_set() labeling and custom-metric authoring suggest evaluation is the current focus, so metrics suited to density-based clusters are the likely next addition.

Recent moves

  1. 1mo ago

    tidyclust 0.3.2 fixes k_means() on sparse predictors

    Fixes k_means() with the stats engine erroring on sparse predictors such as those from recipes::step_dummy() in a workflow. A workflow-path bug fix.

    View source ↗
  2. 1mo ago

    tidyclust 0.3.1 stops same-named metrics silently merging

    cluster_metric_set() now labels each metric with the name it was given, so two wrappers around the same built-in no longer collide and silently merge, and the docs show how to author a custom clustering metric. Small, but it makes comparing metric variants trustworthy.

    View source ↗
  3. 2mo ago

    tidyclust 0.3.0 adds DBSCAN, Gaussian mixture, and mean shift models

    ⚡ SPARK

    Three new clustering specifications land at once — db_clust() for DBSCAN and HDBSCAN, gm_clust() for Gaussian mixtures, and mean_shift() — while the tidyclust-specific finalization functions are deprecated in favor of tune's native cluster_spec support. It moves the package past centroid-based methods and folds it into the shared tidymodels verbs.

    View source ↗
  4. 1y ago

    tidyclust 0.2.4 switches distance calculations to philentropy

    Distance calculations switch from Rfast to philentropy. A dependency change with no user-facing effect.

    View source ↗
  5. 2y ago

    tidyclust 0.2.3 resolves a clustMixType reverse-dependency issue

    A release made solely to resolve a reverse-dependency issue for clustMixType. Ecosystem housekeeping.

    View source ↗
  6. 2y ago

    tidyclust 0.2.2 resolves a ClusterR reverse-dependency issue

    A release made to resolve a reverse-dependency issue for ClusterR, the same pattern as 0.2.3.

    View source ↗