A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/tidymodels/parsnip/issues/234 below:

Failure on predicting class prob from `multinom_reg()` with penalty · Issue #234 · tidymodels/parsnip · GitHub

library(parsnip)

mod <- multinom_reg(penalty = 0.01)
mod <- set_engine(mod, "glmnet")

fit <- fit(mod, Species ~ Sepal.Length + Sepal.Width, iris)

predict(fit, iris, type = "prob")
#> Error: `predict()` doesn't work with multiple penalties (i.e. lambdas). Please specify a single value using `penalty = some_value` or use `multi_predict()` to get multiple predictions per row of data.

Created on 2019-11-11 by the reprex package (v0.3.0.9000)

The failure is in this part of parsnip:::predict_classprob.model_fit()

new_data <- object$spec$method$pred$prob$pre(new_data, object)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4