.ipynb_checkpoints/create.mlp-checkpoint: Initializes a new neural network.

create.mlpR Documentation

Initializes a new neural network.

Description

Initializes a new neural network.

Usage

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
)

Arguments

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.

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.

Examples

 create.mlp(Species ~ ., data=iris, hidden=c(5,5,5), type="classification")

Greg-Hallenbeck/easy.mlp documentation built on March 10, 2023, 6:31 a.m.