nnet::multinom() 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 1 tuning parameters:
penalty: Amount of Regularization (type: double, default: 0.0)
penalty, the amount of regularization includes only the L2 penalty
(i.e., ridge or weight decay).
multinom_reg(penalty = double(1)) %>% set_engine("nnet") %>% translate()
## Multinomial Regression Model Specification (classification) ## ## Main Arguments: ## penalty = double(1) ## ## Computational engine: nnet ## ## Model fit template: ## nnet::multinom(formula = missing_arg(), data = missing_arg(), ## decay = double(1), trace = FALSE)
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.
The “Fitting and Predicting with parsnip” article contains
multinom_reg() with the
The underlying model implementation does not allow for case weights.
This model object contains data that are not required to make predictions. When saving the model for the purpose of prediction, the size of the saved object might be substantially reduced by using functions from the butcher package.
Luraschi, J, K Kuo, and E Ruiz. 2019. Mastering nnet with R. O’Reilly Media
Hastie, T, R Tibshirani, and M Wainwright. 2015. Statistical Learning with Sparsity. CRC Press.
Kuhn, M, and K Johnson. 2013. Applied Predictive Modeling. Springer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.