Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

null_model

General Interface for null models


Description

null_model() is a way to generate a specification of a model before fitting and allows the model to be created using R. It doesn't have any main arguments.

Usage

null_model(mode = "classification")

Arguments

mode

A single character string for the type of model. 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()
## Model Specification (regression)
## 
## Computational engine: parsnip 
## 
## Model fit template:
## nullmodel(x = missing_arg(), y = missing_arg())
null_model() %>% 
  set_engine("parsnip") %>% 
  set_mode("classification") %>% 
  translate()
## Model Specification (classification)
## 
## Computational engine: parsnip 
## 
## Model fit template:
## nullmodel(x = missing_arg(), y = missing_arg())

See Also

Examples

null_model(mode = "regression")

parsnip

A Common API to Modeling and Analysis Functions

v0.1.5
GPL-2
Authors
Max Kuhn [aut, cre], Davis Vaughan [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.