Skip to content

Remove S3 from model functions  #2

@topepo

Description

@topepo

Previously, the idea was to figure out the mode from data, so there were different methods for formulas, recipes etc.

However, the mode is manually specified now so we don't need a class for the models (and different methods).

If we kept them, we would need to always specify the mode even when there is on'y one choice (e.g. logistic regression). For example:

> library(parsnip)
> logistic_reg()
Logistic Regression Model Specification (classification)


> logistic_reg(mixture = varying())
Error in varying() : This is a placeholder and should not be evaluated
>
> #we would need to do:
> logistic_reg(mode = "classification", mixture = varying())
Logistic Regression Model Specification (classification)

Main Arguments:
mixture:   varying()

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