Skip to contents

Train a three layers neural network model.

Usage

mi_train_BP(
  train,
  test,
  cls = "class",
  path2save = NULL,
  batch_size = 128,
  epochs = 64,
  validation_split = 0.3,
  verbose = 0
)

Arguments

train

A dataframe with the class column as label.

test

A dataframe with the class column as label.

cls

A character.The name of the label column.

path2save

The folder path to store the model and train history.

batch_size

Integer or NULL. The number of samples per gradient update.

epochs

The number of epochs to train the model.

validation_split

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

verbose

The verbosity mode.

Value

A list object containing the prediction confusion matrix, the model object, and the mapping of predicted numbers to classes.