null_model: Null model

View source: R/nullmodel.R

null_modelR Documentation

Null model

Description

null_model() defines a simple, non-informative model. It doesn't have any main arguments. This function can fit classification and regression models.

Usage

null_model(mode = "classification")

Arguments

mode

A single character string for the prediction outcome mode. Possible values for this model are "unknown", "regression", or "classification".

Details

The model can be created using the fit() function using the following engines:

  • R: "parsnip"

Engine Details

Engines may have pre-set default arguments when executing the model fit call. For this type of model, the template of the fit calls are below:

parsnip

null_model() %>% 
  set_engine("parsnip") %>% 
  set_mode("regression") %>% 
  translate()
## Null Model Specification (regression)
## 
## Computational engine: parsnip 
## 
## Model fit template:
## parsnip::nullmodel(x = missing_arg(), y = missing_arg())
null_model() %>% 
  set_engine("parsnip") %>% 
  set_mode("classification") %>% 
  translate()
## Null Model Specification (classification)
## 
## Computational engine: parsnip 
## 
## Model fit template:
## parsnip::nullmodel(x = missing_arg(), y = missing_arg())

See Also

fit.model_spec()

Examples

null_model(mode = "regression")

parsnip documentation built on June 16, 2022, 5:10 p.m.