deweather provides multiple 'getter' functions for extracting relevant
model features from a deweather model. These are a useful convenience,
particularly in conjunction with R's pipe operator (|>).
Usage
get_dw_pollutant(dw)
get_dw_vars(dw)
get_dw_params(dw, param = NULL)
get_dw_input_data(dw)
get_dw_model(dw)
get_dw_engine(dw)
get_dw_importance(dw, aggregate_factors = FALSE, sort = TRUE)Arguments
- dw
A deweather model created with
build_dw_model().- param
For
get_dw_params(). The default (NULL) returns a list of model parameters.paramwill return one specific parameter as a character vector.- aggregate_factors
Defaults to
FALSE. IfTRUE, the importance of factor inputs (e.g., Weekday) will be summed into a single variable. This only applies to certain engines which report factor importance as disaggregate features.- sort
If
TRUE, the default, features will be sorted by their importance. IfFALSE, they will be sorted alphabetically. Inplot_dw_importance()this will change the ordering of the y-axis, whereas inget_dw_importance()it will change whethervaris returned as a factor or character data type.
Value
Typically a character vector, except:
get_dw_params(): a list, unlessparamis set.get_dw_importance(): adata.frameget_dw_model(): A parsnip::model_fit object
