View source: R/makeFunctionalData.R
makeFunctionalData | R Documentation |
To work with functional features, those features need to be
stored as a matrix
column in the data.frame, so mlr
can automatically
recognize them as functional features.
This function allows for an easy conversion from a data.frame with numeric columns
to the required format. If the data already contains matrix columns, they are left as-is
if not specified otherwise in fd.features
. See Examples
for the structure
of the generated output.
makeFunctionalData(data, fd.features = NULL, exclude.cols = NULL)
data |
(data.frame) |
fd.features |
(list) |
exclude.cols |
(character | integer) |
(data.frame).
# data.frame where columns 1:6 and 8:10 belong to a functional feature
d1 = data.frame(matrix(rnorm(100), nrow = 10), "target" = seq_len(10))
# Transform to functional data
d2 = makeFunctionalData(d1, fd.features = list("fd1" = 1:6, "fd2" = 8:10))
# Create a regression task
makeRegrTask(data = d2, target = "target")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.