main_best_model_retrofit: Returns the best model for retrofit data

Description Usage Arguments Details See Also Examples

View source: R/retrofit_controller.R

Description

This function returns the best model if there is one for retrofit data. Otherwise, return a null list.

Usage

1
2
main_best_model_retrofit(inter_result, energy, metric_vec = c(1, 2, 3, 4,
  5), CV_RMSE_n = 0.25, Rsquared_n = 0.75)

Arguments

inter_result

A list containing information about parameters such as slopes, change-points, and stats such as RMSE.

energy

A charcter string. Energy Type, either 'Elec' or 'Fuel'.

metric_vec

A numeric (integer) vector. This vector determines the pirority of model types. Defaults to c(1,2,3,4,5) for models: '2P', '3PC', '3PH', '4P', '5P'.

CV_RMSE_n

A numeric value. CV-RMSE threshold value. Defaults to 0.25.

Rsquared_n

A numeric value. Rsquared threshold value. Defaults to 0.75.

Details

If some models pass all of shape test, t-test, and population test but do not meet threshold CV-RMSE, the model will the lowest CV-RMSE will be selected as the best model. If none of the model passes all of shape test, t-test, and population test, it will return a list with null component.

See Also

main_best_model_func, run_model, and run_model_retrofit

Examples

1
2
3
4
5
6
## Not run: 
retrofit_util = subset(retrofit_utility, retrofit_utility$bdbid == 846152
           & retrofit_utility$energy_type == 'Elec') #retrofit data
retrofit_result = run_model_retrofit(retrofit_util)
retrofit_best_result = main_best_model_retrofit(retrofit_result, 'Elec')
## End(Not run)

tinnaing347/bRema documentation built on Aug. 23, 2019, 9:15 p.m.