predict.mlp: Make predictions using the neural network.

View source: R/predict.mlp.R View source: R/.ipynb_checkpoints/predict.mlp-checkpoint.R

predict.mlpR Documentation

Make predictions using the neural network.

Description

Make predictions using the neural network.

Usage

## S3 method for class 'mlp'
predict(network, newdata = "train", type = NULL)

Arguments

network

An object of class 'mlp' used to make predictions.

newdata

An object of class 'data.frame' with the same input columns as the data frame used to create the network. If left NULL, the training data will be used. If set to "valid", the validation data will be used.

type

What should be returned. If set to "numeric", then predicted numeric values (regression), probabilities (logistic), or a matrix of probability for each class (classification) is returned. For a classification network, type="labels" can be used to return the class with the highest probability.

Value

A vector (or matrix, for a classification network) of the predicted outputs.

Examples

   predict(network, type="labels")
   predict(network, newdata="valid", type="labels")
   predict(network, newdata=test.data)

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