best_worst_model: Filters model with lowest CV-RMSE

Description Usage Arguments Details See Also Examples

View source: R/retrofit_controller.R

Description

This function filters for model with lowest CV-RMSE value given a nested list of model result.

Usage

1
2
best_worst_model(inter_result, bdbid = NA, energy, fiscal_year = NA,
  n = NA, prepost = 1)

Arguments

inter_result

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

bdbid

Building id, which identifies the building or the dataset. Defaults to NA.

energy

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

fiscal_year

Fiscal year. Defaults to NA.

n

number of observed points (independent variable) in utility data frame of a building. Defaults to NA.

prepost

A numeric value. Defaults to be 1. This indicates if it is unretrofit or retrofit (pre or post). See unretrofit_utility for more information about prepost.

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 NULL.

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 = best_worst_model(retrofit_result$post, bdbid = 846152, 'Elec', prepost = 3)
## End(Not run)

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