Multinomial regression via kerasSource:
keras_mlp() fits a model that uses linear predictors to predict
multiclass data using the multinomial distribution.
For this engine, there is a single mode: classification
This model has one tuning parameter:
penalty: Amount of Regularization (type: double, default: 0.0)
penalty, the amount of regularization is only L2 penalty (i.e.,
ridge or weight decay).
## Multinomial Regression Model Specification (classification) ## ## Main Arguments: ## penalty = double(1) ## ## Computational engine: keras ## ## Model fit template: ## parsnip::keras_mlp(x = missing_arg(), y = missing_arg(), penalty = double(1), ## hidden_units = 1, act = "linear")
keras_mlp() is a parsnip wrapper around keras code for
neural networks. This model fits a linear regression as a network with a
single hidden unit.
Factor/categorical predictors need to be converted to numeric values
(e.g., dummy or indicator variables) for this engine. When using the
formula method via
fit(), parsnip will
convert factor columns to indicators.
Predictors should have the same scale. One way to achieve this is to center and scale each so that each predictor has mean zero and a variance of one.
Models fitted with this engine may require native serialization methods to be properly saved and/or passed between R sessions. To learn more about preparing fitted models for serialization, see the bundle package.