When performing k-means, if you use the wrong name for nstart (e.g., nstarts) it does not throw you an error. For example, the following code chunk runs without error:
However, when you add this to a workflow you get the following error:
`x Apparent: preprocessor 1/1, model 1/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 2/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 3/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 4/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 5/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 6/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 7/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 8/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 9/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 10/10: Error in stats::kmeans(data, centers, ......
Warning message:
“All models failed. See the .notes column.”
Error in estimate_tune_results():
! All models failed. Run show_notes(.Last.tune.result) for more information.
Traceback:
When performing k-means, if you use the wrong name for
nstart
(e.g., nstarts) it does not throw you an error. For example, the following code chunk runs without error:kmeans_spec_tune <- k_means(num_clusters = tune()) |> set_engine("stats", nstarts = 10) kmeans_spec_tune
However, when you add this to a workflow you get the following error:
`x Apparent: preprocessor 1/1, model 1/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 2/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 3/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 4/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 5/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 6/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 7/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 8/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 9/10: Error in stats::kmeans(data, centers, ...)...
x Apparent: preprocessor 1/1, model 10/10: Error in stats::kmeans(data, centers, ......
Warning message: “All models failed. See the
.notes
column.” Error inestimate_tune_results()
: ! All models failed. Runshow_notes(.Last.tune.result)
for more information. Traceback:show_notes(.Last.tune.result)
for more information.")It would be helpful and informative for the error to come earlier so it is easier to diagnose the problem. Thank you!