
Use the 'best parameters' determined by tune_dw_model() to build a Deweather Model
Source: R/finalise_tdw_model.R
finalise_tdw_model.RdThis function takes the output of tune_dw_model() and uses the
best_params defined within. This is a convenient wrapper around
build_dw_model() if you have already run tune_dw_model() and are broadly
happy with the parameters it has chosen. That being said, the params
argument can be used to override specific hyperparameters.
Usage
finalise_tdw_model(tdw, data, params = list(), ..., .date = "date")Arguments
- tdw
A deweather tuning object created with
tune_dw_model().- data
An input
data.framecontaining one pollutant column (defined usingpollutant) and a collection of feature columns (defined usingvars). This must be provided in addition totdwas it is expected most users will have providedtune_dw_model()with a sampled dataset.- params
A named list. These parameters are used to override the
best_paramsdefined withintdw. For example, if the 'best' parameter fortreesis 50,params = list(trees = 100)will set it to 100 instead. This also includes engine-specific parameters (e.g.,lambdafor thexgboostengine).- ...
Not currently used. To add engine-specific models, add them to
tune_dw_model()and they will be picked up automatically, or usebuild_dw_model()directly.- .date
The name of the 'date' column which defines the air quality timeseries. Passed to
append_dw_vars()if needed. Also used to extract the time zone of the data for later restoration iftrendis used as a variable.