addTask: Create a new Task within a Module in an existing Pipeline

Description Usage Arguments Details Examples

View source: R/addTask.R

Description

A more detailed description will eventually go here...

Usage

1
2
addTask(pipeline, module, label, method, parameters = NULL,
  libraries = NULL, control = NULL)

Arguments

pipeline

an object of class Pipeline

module

the label of the module that will contain the task

label

a character string

method

a user-defined function. The input/output requirements for method are dependent upon the class of module. See details below for more information.

parameters

A data frame with named columns parameter, class, and label. parameters should contain the names, classes, and default values of all additional input parameters passed to method.

libraries

A character vector of libraries required in method.

control

A named list with values of parameters to pass to method.

Details

Specific input parameters and outputs are required for user-defined methods depending on the class of module. Tasks added to M1 modules are required to have input parameter x. Tasks added to M2 modules are required to have input parameters x, y, and optionally data. Tasks added to M3 modules are required to have input parameters x and rank. Tasks added to M4 modules are required to have input parameters x, y, and testdata.

Examples

1
2
3
4
5
6
## Not run: 
pipeline <- newPipeline(label="example pipeline", cv="cv", nfolds=10, p=0.80)
addModule(pipeline, type="M1", label="module 1")
addTask(pipeline, "module 1", label="task 1", method=function(x){return(x[1:5,])})

## End(Not run)

jperezrogers/rabbit documentation built on Feb. 9, 2020, 4:59 p.m.