batch_run: Batch run for both energy type (unretrofit)

Description Usage Arguments Value Note Examples

View source: R/modeller.R

Description

This function run batches given a utility data frame of unretrofit data. See unretrofit_utility.

Usage

1
2
3
4
batch_run(utility, metric_elec = c(1, 2, 3, 4, 5), metric_fuel = c(1,
  5, 4, 3, 2), plot_flag = FALSE, step = 0.5, CV_RMSE_elec = 0.25,
  Rsquared_elec = 0.75, CV_RMSE_fuel = 0.5, Rsquared_fuel = 0.75,
  n = 4, all_model_flag = FALSE)

Arguments

utility

A utility data frame of unretrofit datawith multiple buildings.

metric_elec

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

metric_fuel

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

plot_flag

A boolean value. Defaults to FALSE. If set to FALSE, it will not return any plots.

step

A single numeric value or a vector. If it is a single numeric value, create_model will be used to find change-point(s). If it is a vector with more than one component, create_model_2 will be used. Defaults to 0.5. Adjust step-size depending on independent varaiables.

CV_RMSE_elec

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

Rsquared_elec

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

CV_RMSE_fuel

A numeric value. CV-RMSE threshold value for Fuel. Defaults to 0.50.

Rsquared_fuel

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

n

A numeric value that determines threshold for population test: thereshold = number_of_independent_variables/n. Defaults to 4. See pop_test.

all_model_flag

A boolean value. Defaults to FALSE. If set to TRUE, information of all models (i.e not just the best model) of a building will be put into a dataframe.

Value

A list with components:

best_result_df

A data frame of best models of mulitple buildings. If a building does not model, it will not be shown in this data frame.

plot_list

A list containing plots. If plot_flag is set to FALSE, this will be an empty list.

all_model_df

A data frame of all models of multiple buildings. If all_model_flag is set to FALSE, this will be an empty data frame.

Note

If more than half of energy usage points of a facility are zeros, that faciltiy will be skipped.

Examples

1
2
3
4
## Not run: 
batch_result = batch_run(unretrofit_utility)

## End(Not run)

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