tidymodels / tidyclust

A tidy unified interface to clustering models
https://tidyclust.tidymodels.org/
Other
109 stars 17 forks source link

error in metric functions for cluster_spec #146

Closed EmilHvitfeldt closed 1 year ago

EmilHvitfeldt commented 1 year ago

Current:

library(tidyclust)

spec <- k_means(num_clusters = 4)

sse_ratio(spec)
#> Error in UseMethod("sse_ratio"): no applicable method for 'sse_ratio' applied to an object of class "c('k_means', 'cluster_spec', 'unsupervised_spec')"

This PR:

library(tidyclust)

spec <- k_means(num_clusters = 4)

sse_ratio(spec)
#> Error in `sse_ratio()`:
#> ! This function requires a fitted model. Please use `fit()` on your cluster specification.
github-actions[bot] commented 1 year ago

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.