fit_MLP: Fit SLP/MLP model

View source: R/deepMLP.r

fit_MLPR Documentation

Fit SLP/MLP model

Description

fit_MLP is a wrapper function for fitting a feedforward SLP or MLP.

Usage

fit_MLP(
  model,
  x,
  y,
  batch_size = 1,
  epochs = 10,
  verbose = 1,
  validation_split = 0,
  cross_validation = NULL
)

Arguments

model

A model object to train, e.g. returned by build_MLP.

x

A feature data set, usually a matrix or data frame.

y

An outcome data set, usually a vector, matrix or data frame.

batch_size

Batch size, the number of samples per gradient update.

epochs

Number of epochs to train the model.

verbose

Verbosity mode (0 = silent, 1 = progress bar, 2 = one line per epoch) determines how the training progress is visualized.

validation_split

Float between 0 and 1. Fraction of the training data used as validation data.

cross_validation

List or NULL (default). The list contains two elements whereby the first element stands for the number of folds (k) and the second element indicates the type min or max for quality measuring.

Value

A trained model object.

See Also

build_MLP, fit.keras.engine.training.Model, evaluate.keras.engine.training.Model.

Other Single & Multi Layer Perceptron (SLP, MLP): as_MLP_X(), as_MLP_Y(), as_tensor_1d(), as_tensor_2d(), as_tensor_3d(), build_MLP(), load_weights_ANN(), nsamples(), nsubsequences(), ntimesteps(), nunits(), predict_ANN(), save_weights_ANN()


stschn/deepANN documentation built on June 25, 2024, 7:27 a.m.