Regression.Batch.Fit: Batch Training, Prediction and Diagnostics of Regression Base...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/baselearners.R

Description

Batch Training, Prediction and Diagnostics of Regression Base Learners.

Usage

1
2
3
4
5
6
Regression.Batch.Fit(config.list, formula, data, ncores = 1
  , filemethod = FALSE, print.level = 1)
## S3 method for class 'Regression.Batch.FitObj'
predict(object, ..., ncores=1)
## S3 method for class 'Regression.Batch.FitObj'
plot(x, errfun=rmse.error, ...)

Arguments

config.list

List of configuration objects for batch of base learners to be trained.

formula

Formula objects expressing response and covariates.

data

Data frame containing response and covariates.

ncores

Number of cores to use during parallel training.

filemethod

Boolean indicator of whether to save estimation objects to disk or not.

print.level

Determining level of command-line output verbosity during training.

object

Object of class Regression.Batch.FitObj to make predictions for.

...

Arguments to be passed from/to other functions.

x

Object of class Regression.Batch.FitObj to plot.

errfun

Error function to use for calculating errors plotted.

Value

Function Regression.Batch.Fit returns an object of class Regression.Batch.FitObj. Function predict.Regression.Batch.FitObj returns a matrix of predictions, each column corresponding to one base learner in the trained batch. Function plot.Regression.Batch.FitObj creates a plot of base learner errors over the training set, grouped by type of base learner (all configurations within a given base learner using the same symbol).

Author(s)

Alireza S. Mahani, Mansour T.A. Sharabiani

See Also

Regression.Batch.FitObj

Examples

1
2
3
4
5
6
7
8
9
data(servo)
myformula <- class~motor+screw+pgain+vgain
myconfigs <- make.configs("knn")
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,]
ret <- Regression.Batch.Fit(myconfigs, myformula, data.train, ncores=2)
newpred <- predict(ret, data.predict)

EnsembleBase documentation built on May 30, 2017, 5:14 a.m.