tmastny / tsrecipes

Time Series Feature Engineering
https://tmastny.github.io/tsrecipes/
Other
4 stars 1 forks source link

Clustering example does not work #1

Open durraniu opened 3 years ago

durraniu commented 3 years ago

Thank you for this package. I have tried the example on the pkgdown site, but it throws an error as shown below:

> library(tidymodels)
-- Attaching packages ------------------------------------------------------ tidymodels 0.1.2 --
v broom     0.7.3      v recipes   0.1.15
v dials     0.0.9      v rsample   0.0.8 
v dplyr     1.0.2      v tibble    3.0.4 
v ggplot2   3.3.3      v tidyr     1.1.2 
v infer     0.5.3      v tune      0.1.2 
v modeldata 0.1.0      v workflows 0.2.1 
v parsnip   0.1.4      v yardstick 0.0.7 
v purrr     0.3.4      
-- Conflicts --------------------------------------------------------- tidymodels_conflicts() --
x purrr::discard() masks scales::discard()
x dplyr::filter()  masks stats::filter()
x dplyr::lag()     masks stats::lag()
x recipes::step()  masks stats::step()
> library(tsrecipes)
> recipe(ethanol) %>%
+   step_dtw(ts, k = 4) %>%
+   prep() %>%
+   bake(ethanol)
Error in UseMethod("prep") : 
  no applicable method for 'prep' applied to an object of class "c('step_dtw', 'step')"
tmastny commented 3 years ago

Thanks for the report!

I'm surprised by that error message, because there is an S3 method for prep: https://github.com/tmastny/tsrecipes/blob/4151c4b1bc4543f18ca43e3fddc008eefe940bde/R/dtw.R#L62

I'll dive in and see what's going on tonight. Perhaps there was a breaking change in recipes.

lg1000 commented 2 years ago

I have experienced the same error. Is there any progress, concerning the issue?

hummuscience commented 1 year ago

Same issue here.

JalalAl-Tamimi commented 4 months ago

Hi there, The same error occurs on the example and on another dataset. Is there any progress on this issue as it is still not working?