View source: R/create.mlp.R View source: R/.ipynb_checkpoints/create.mlp-checkpoint.R
create.mlp | R Documentation |
Create a new neural network to fitting tabular data. The network is initialized randomized weights and should be trained with the 'train()' function.
create.mlp( formula, data = NULL, hidden = c(), type = NULL, activation = "leaky.relu", valid.split = 0.25, randomize = TRUE, learning.rate = 0.001, momentum.beta = 0.9, rmsprop.beta = 0.999, batch.size = 64 )
formula |
An object of class 'formula' describing the model to be fit. |
data |
A 'data.frame' object containing the training and validation data. |
hidden |
A vector indicating how many layers and hidden notes the network will have. Passing c(4,5,2) creates a network with 3 hidden layers with 4, 5, and 2 nodes, respectively. |
type |
One of "regression", "logistic", or "classification". |
activation |
The name of a function to be used for activations in the hidden layers. "leaky.relu", "relu", "tanh", and "sigmoid" are included in the package. |
valid.split |
The fraction of the data to be used for validation. |
randomize |
If TRUE, the data frame will be randomly sampled before train/validation split. If not, the final rows are the validation data. |
learning.rate |
The learning rate of the network. |
momentum.beta |
Beta parameter for gradient descent with momentum. |
batch.size |
Minibatch size. Choosing 1 is equivalent to stochastic gradient descent. |
rmpsprop.beta |
Beta parameter for RMSprop gradient descent. |
An object of class 'mlp'
create.mlp(Species ~ ., data=iris, hidden=c(5,5,5), type="classification")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.