Regression.Batch.Fit {EnsembleBase} | R Documentation |
Batch Training, Prediction and Diagnostics of Regression Base Learners
Description
Batch Training, Prediction and Diagnostics of Regression Base Learners.
Usage
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 |
... |
Arguments to be passed from/to other functions. |
x |
Object of class |
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
Examples
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)