CreateAlgo: Create Algorithm

Description Usage Arguments Value Examples

Description

It is an auxiliary function to help creating new algorithms in the package standarts.

Usage

1
CreateAlgo(algoName, algoFun, task, paramList)

Arguments

algoName

A character string that represents the algorithm name.

algoFun

A function class object.

task

A character string vector, cointaning 'MultClass' or/and 'BinClass' and/or 'Regression'.

paramList

A list of all parameters and their values to be tested, NULL if none.

Value

An object of class algorithm.

Examples

1
2
3
4
5
6
7
algoName <- 'myAlgo'
algoFun <- function(X_train, Y_train, X_test, param1){
 set.seed(param1)
 sample(Y_train, size = nrow(X_test), replace = TRUE)}
task <- c('MultClass', 'BinClass')
paramList = list(param1 = 1:3)
CreateAlgo(algoName = algoName, algoFun = algoFun, task = task, paramList = paramList)

PauloCirino/MLAT documentation built on May 13, 2019, 1:22 p.m.