Learn R Programming

gratis (version 1.0.7)

generate_ts_with_target: Generating time series with controllable features.

Description

Deprecated function. Please use generate_target() instead.

Usage

generate_ts_with_target(
  n,
  ts.length,
  freq,
  seasonal,
  features,
  selected.features,
  target,
  parallel = TRUE,
  output_format = "list"
)

Value

A time-series object of class "ts" or "msts".

Arguments

n

number of time series to be generated.

ts.length

length of the time series to be generated.

freq

frequency of the time series to be generated.

seasonal

0 for non-seasonal data, 1 for single-seasonal data, and 2 for multiple seasonal data.

features

a vector of function names.

selected.features

selected features to be controlled.

target

target feature values.

parallel

An optional argument which allows to specify if the Genetic Algorithm should be run sequentially or in parallel.

output_format

An optional argument which allows to choose output format between 'list' and 'tsibble'

Author

Yanfei Kang

Examples

Run this code
library(tsfeatures)
x <- generate_ts_with_target(
  n = 1, ts.length = 60, freq = 1, seasonal = 0,
  features = c("entropy", "stl_features"), selected.features = c("entropy", "trend"),
  target = c(0.6, 0.9), parallel = FALSE
)
forecast::autoplot(x)

Run the code above in your browser using DataLab