ykang / gratis

GRATIS: GeneRAting TIme Series with diverse and controllable characteristics
https://github.com/ykang/gratis
GNU General Public License v3.0
76 stars 29 forks source link

how to change the features? #4

Closed waterwheel31 closed 5 years ago

waterwheel31 commented 5 years ago

I found this generator interesting, and tried to generate time series data. However, when I tried to add one feature from the sample, I am stacked. How can I add features?

Following is the code to try to add 'seasonal.strength', but I found an error saying "task 1 failed - "object 'seasonal.strength' of mode 'function' was not found" How can I do?

Plus, how can I do for other features which are on the paper (Kang, Hyndman, Li 2018) ?


x <- generate_ts_with_target(n = 2, ts.length = 360, freq = 1, seasonal = 0, features = c('entropy', 'stl_features','seasonal.strength'), selected.features = c('entropy', 'trend','seasonal.strength'), target = c(0.2 0.9, 0.5) )

feng-li commented 5 years ago

Duplicate of #3

The argument features should be a vector of function names. These functions are operations of time series features. x_acf1 comes from the outputs of the acf_features function in the package tsfeatures. Also, the stl_features function in the package tsfeatures outputs a vector of time series feature including trend, linearity, seasonal_strength, etc. In your case, the argument features can be set as c('stl_features', 'acf_features', 'entropy', 'lumpiness', 'flat_spots', 'crossing_points', 'max_kl_shift', 'max_level_shift', 'max_var_shift', 'mean', 'var').

Originally posted by @ykang in https://github.com/ykang/tsgeneration/issues/3#issuecomment-427557228