Skip to content

Error in UseMethod("predict") : no applicable method for 'predict' applied to an object of class "c('elnet', 'glmnet')" #249

Closed
@konradsemsch

Description

@konradsemsch

I'm attaching a zipped rds object that contains all the information to make this example reproducible. I'm essentially trying to make a prediction on a fitted workflow, but that gives me the following error. Could you please take a look?

library(recipes)
library(parsnip)

df_input <- diamonds[1, ]
pipeline <- readRDS("/pipeline.rds")

predict(pipeline$workflow, df_input)

Giving the following error:

Error in UseMethod("predict") : 
  no applicable method for 'predict' applied to an object of class "c('elnet', 'glmnet')"

pipeline.rds.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions