resample_tsc: Resample a time-series classifier. Can be used to replicate...

Description Usage Arguments Value Examples

View source: R/TSClassifier.R

Description

Resample a time-series classifier. Can be used to replicate the benchmark in the Time-Series Classification Bake-Off by Bagnall et al. 2017 Currently prints out the resampling accuracy.

Usage

1
2
resample_tsc(data, target = NULL, classifier, par_vals = NULL,
  model_path = NULL, data_path = NULL, cleanup_data = FALSE)

Arguments

data

character(1) | data.frame
Either a path to the dataset or a data.frame that should be saved to disk for modeling. In case a data.frame is provided, the dataset is saved to disk via data_to_path.

target

character(1)
Name of the target variable.

classifier

character(1)
Character describing the classifier. See ?tsc_classifiers.

par_vals

list
(Optional) Hyperparameters for the models.
See ?tsc_classifiers for hyperparameters.

model_path

character(1)
Path where the resulting model should be saved to.

data_path

character(1)
Path where train and test data should be saved to. Defaults to a temporary file.

cleanup_data

logical(1)
Should the data be deleted from disk after training / prediction?

Value

NULL, Writes a Java instance of TrainAndPredict to model_path.

Examples

1
2
3
4
5
6
## Not run: 
  data = data.frame(matrix(rnorm(300), nrow = 30))
  data$class = factor(sample(letters[1:2], 10, replace = TRUE))
  resample_tsc(data, target = "class", classifier = "J48", model_path = tempfile())

## End(Not run)

compstat-lmu/TSClassification documentation built on Nov. 18, 2019, 6:56 a.m.