Similar to other predict methods, this function predicts fitted values from a fitted "MLPRegressor" object.

# S3 method for MLPRegressor
predict(model, data, key, features = NULL)

Arguments

model

R6Class object
A 'MLPRegressor' object for prediction.

data

DataFrame
DataFrame containting the data.

key

character
Name of the ID column.

features

character of list of characters, optional
Name of feature columns for prediction.
If not provided, it defaults to all non-key columns of data.

Format

S3 methods

Value

DataFrame

  • ID, integer - ID column, with the same name and type as data's ID column

  • TARGET, nvarchar - predicted class name.

  • VALUE, double - softmax value for the predicted class.

Examples

Call the function and predict with a "MLPRegressor" object mplr:

> predict (mplr, data, key = "ID")

See also