Description Usage Arguments Value See Also Examples
This function returns the best model if there is one. Otherwise, returns an empty list.
1 2 | main_best_model_func(inter_result, metric_vec = c(1, 2, 3, 4, 5),
CV_RMSE_n = 0.25, Rsquared_n = 0.75)
|
inter_result |
A list containing information about parameters such as slopes, change-points, and stats such as RMSE. |
metric_vec |
A numeric (integer) vector. This vector determines the pirority of model types. Defaults to |
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. |
A list with components:
stats |
A matrix of statistical results such as RMSE, R-squared |
params |
A matrix of parameters such as basload and slopes |
cp1 |
Change point. The leftmost change point. This will be zero if |
cp2 |
Change point. The rightmost change point. This will be zero if |
model |
Model type. |
stat_test$main_test |
Main(final) test result. Will be 'Fail' if the model fails one of tTest, population test or shape test. Else, 'Passs'. |
stat_test$tTest |
t-test results |
stat_test$pop_test |
population test results |
stat_test$shape_test |
shape test results |
figure |
A parameter graph. |
run_model
, and run_model_retrofit
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
util = subset(unretrofit_utility, unretrofit_utility$bdbid == 'f3acce86'
& unretrofit_utility$energy_type == 'Elec') #unretrofit data
result = run_model(util)
best_result = main_best_model_func(result, 'Elec') #best_model for unretrofit data
retrofit_util = subset(retrofit_utility, retrofit_utility$bdbid == 846152
& retrofit_utility$energy_type == 'Elec') #retrofit data
retrofit_result = run_model_retrofit(retrofit_util)
retrofit_result$pre #result for pre-retrofit
#best_model for pre-retrofit data
retrofit_best_result = main_best_model_func(retrofit_result$pre, 'Elec')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.