automl_train: automl_train

Description Usage Arguments Examples

View source: R/automl.R

Description

The multi deep neural network automatic train function (several deep neural networks are trained with automatic hyperparameters tuning, best model is kept)
This function launches the automl_train_manual function by passing it parameters for each particle at each converging step

Usage

1
automl_train(Xref, Yref, autopar = list(), hpar = list(), mdlref = NULL)

Arguments

Xref

inputs matrix or data.frame (containing numerical values only)

Yref

target matrix or data.frame (containing numerical values only)

autopar

list of parameters for hyperparameters optimization, see autopar section
Not mandatory (the list is preset and all arguments are initialized with default value) but it is advisable to adjust some important arguments for performance reasons (including processing time)

hpar

list of parameters and hyperparameters for Deep Neural Network, see hpar section
Not mandatory (the list is preset and all arguments are initialized with default value) but it is advisable to adjust some important arguments for performance reasons (including processing time)

mdlref

model trained with automl_train to start training with saved hpar and autopar (not the model)
nb: manually entered parameters above override loaded ones

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
##REGRESSION (predict Sepal.Length given other Iris parameters)
data(iris)
xmat <- cbind(iris[,2:4], as.numeric(iris$Species))
ymat <- iris[,1]
amlmodel <- automl_train(Xref = xmat, Yref = ymat)

## End(Not run)
##CLASSIFICATION (predict Species given other Iris parameters)
data(iris)
xmat = iris[,1:4]
lab2pred <- levels(iris$Species)
lghlab <- length(lab2pred)
iris$Species <- as.numeric(iris$Species)
ymat <- matrix(seq(from = 1, to = lghlab, by = 1), nrow(xmat), lghlab, byrow = TRUE)
ymat <- (ymat == as.numeric(iris$Species)) + 0
#with gradient descent and random hyperparameters sets
amlmodel <- automl_train(Xref = xmat, Yref = ymat,
                          autopar = list(numiterations = 1, psopartpopsize = 1, seed = 11),
                          hpar = list(numiterations = 10))

automl documentation built on Jan. 16, 2020, 5:01 p.m.