Regression.CV.Batch.Fit: CV Batch Training and Diagnostics of Regression Base Learners

Description Usage Arguments Value Author(s) See Also Examples

Description

CV Batch Training and Diagnostics of Regression Base Learners.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Regression.CV.Batch.Fit(instance.list, formula, data
  , ncores = 1, filemethod = FALSE, print.level = 1
  , preschedule = TRUE
  , schedule.method = c("random", "as.is", "task.length")
  , task.length)
## S3 method for class 'Regression.CV.Batch.FitObj'
predict(object, ..., ncores=1
  , preschedule = TRUE)
## S3 method for class 'Regression.CV.Batch.FitObj'
plot(x, errfun=rmse.error, ylim.adj = NULL, ...)

Arguments

instance.list

An object of class Instance.List, containing all combinations of base learner configurations and data partitions to perform CV batch training.

formula

Formula object expressing response variable and covariates.

data

Data frame expressing response variable and covariates.

ncores

Number of cores in parallel training.

filemethod

Boolean flag, indicating whether to save estimation objects to file or not.

print.level

Verbosity level.

preschedule

Boolean flag, indicating whether parallel jobs must be scheduled statically (TRUE) or dynamically (FALSE).

schedule.method

Method used for scheduling tasks across threads. In as.is, tasks are distributed in round-robin fashion. In random, tasks are randomly shuffled before round-robin distribution. In task.length, estimated task execution times are used to allocate them to threads to maximize load balance.

task.length

Estimation task execution times, to be used for loading balancing during parallel execution.

object

Output of Regression.CV.Batch.Fit, object of class Regression.CV.Batch.FitObj.

...

Arguments passed from/to other functions.

x

Object of class Regression.CV.Batch.FitObj, to creates a plot from.

errfun

Error function used in generating plot.

ylim.adj

Optional numeric argument to use for adjusting the range of y-axis.

Value

Function Regression.CV.Batch.Fit produces an object of class Regression.CV.Batch.FitObj. The predict method produces a matrix, whose columns each represent training-set predictions from one of the batch of base learners (in CV fashion).

Author(s)

Alireza S. Mahani, Mansour T.A. Sharabiani

See Also

Regression.CV.Batch.FitObj

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(servo)
myformula <- class~motor+screw+pgain+vgain

perc.train <- 0.7
index.train <- sample(1:nrow(servo)
  , size = round(perc.train*nrow(servo)))
data.train <- servo[index.train,]
data.predict <- servo[-index.train,]

parts <- generate.partitions(1, nrow(data.train))
myconfigs <- make.configs("knn"
  , config.df = expand.grid(kernel = "rectangular", k = c(5, 10)))
instances <- make.instances(myconfigs, parts)

ret <- Regression.CV.Batch.Fit(instances, myformula, data.train)
newpred <- predict(ret, data.predict)

EnsembleBase documentation built on May 2, 2019, 2:10 p.m.