Skip to content

Commit

Permalink
feat: allow irregular data for tsfeats PipeOp
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke committed Nov 18, 2024
1 parent 042bb8b commit 1c4d69d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/PipeOpFDAExtract.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ PipeOpFDAExtract = R6Class("PipeOpFDAExtract",
param_set = param_set,
param_vals = param_vals,
packages = c("mlr3fda", "mlr3pipelines", "tf"),
feature_types = c("tfd_irreg", "tfd_reg"),
feature_types = c("tfd_reg", "tfd_irreg"),
tags = "fda"
)
}
Expand Down
2 changes: 1 addition & 1 deletion R/PipeOpFDATSFeatures.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ PipeOpTSFeatures = R6Class("PipeOpTSFeatures",
param_set = param_set,
param_vals = param_vals,
packages = c("mlr3fda", "mlr3pipelines", "tf", "tsfeatures"),
feature_types = "tfd_reg",
feature_types = c("tfd_reg", "tfd_irreg"),
tags = "fda"
)
}
Expand Down
7 changes: 7 additions & 0 deletions tests/testthat/test_PipeOpFDATSFeatures.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@ test_that("PipeOpFDATSFeatures works", {
expect_task(task_tsfeats)
expect_identical(dim(new_data), c(129L, 34L))
expect_named(new_data, names(new_data))

# irregular data works
task = tsk("dti")
pop = po("fda.tsfeats")
task_tsfeats = train_pipeop(pop, list(task))[[1L]]
new_data = task_tsfeats$data()
expect_task(task_tsfeats)
})

0 comments on commit 1c4d69d

Please sign in to comment.