Nothing
Code
fit_xy(k_means(num_clusters = 5), mtcars, y = mtcars$mpg)
Condition
Error in `x_x()`:
! Outcomes are not used in <cluster_spec> objects.
Code
fit(workflows::workflow(mpg ~ ., km), mtcars)
Condition
Error in `x_x()`:
! Outcomes are not used in <cluster_spec> objects.
Code
fit(set_engine(k_means(num_clusters = 10), "stats"), ~., data = small_data)
Condition
Error in `fit()`:
! `num_clusters` must be at most the number of distinct data points (4).
i `num_clusters` was set to 10.
Code
fit(spec, ~., data = mtcars)
Condition
Error in `fit()`:
! Please set the mode in the model specification.
Code
fit <- fit(k_means(num_clusters = 3, engine = NULL), ~., data = mtcars[1:10, ],
control = control_cluster(verbosity = 1))
Condition
Warning:
Engine set to `stats`.
Code
fit <- fit_xy(k_means(num_clusters = 3, engine = NULL), mtcars[1:10, ],
control = control_cluster(verbosity = 1))
Condition
Warning:
Engine set to `stats`.
Code
fit(set_engine(k_means(num_clusters = 3), "stats"), ~., data = mtcars, x = mtcars,
y = mtcars$mpg)
Condition
Error in `fit()`:
! The `fit.cluster_spec()` function is for the formula methods. Use `fit_xy()` instead.
Code
fit(set_engine(k_means(num_clusters = 3), "stats"), "not a formula", data = mtcars)
Condition
Error in `inher()`:
! `formula` should be a string.
Code
fit_xy(set_engine(k_means(num_clusters = 3), "stats"), mat)
Condition
Error in `fit_xy()`:
! `x` should have column names.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.