Regression.CV.Batch.Fit {EnsembleBase} | R Documentation |
CV Batch Training and Diagnostics of Regression Base Learners
Description
CV Batch Training and Diagnostics of Regression Base Learners.
Usage
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 |
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 ( |
schedule.method |
Method used for scheduling tasks across threads. In |
task.length |
Estimation task execution times, to be used for loading balancing during parallel execution. |
object |
Output of |
... |
Arguments passed from/to other functions. |
x |
Object of class |
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
Examples
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)