Run Model

For both the energy and costing training outputs, use the specified models and files to output the model predictions for the specified batch of building files.

run_model.initialize_run_process(docker_input_path, config_file, model_file, ohe_file, cleaned_columns_file, scaler_X_file, scaler_y_file, building_params_folder, start_date, end_date, selected_features_file)

Initializes the running model for either costing or energy runs.

Parameters:
  • docker_input_path – The input prefix to be used for all files provided.

  • config_file – Location of the .yml config file (default name is input_config.yml).

  • model_file – Location and name of a .h5 trained keras model to be used for training.

  • ohe_file – Location and name of a ohe.pkl OneHotEncoder file which was generated in the root of a training output folder.

  • cleaned_columns_file – Location and name of a cleaned_columns.json file which was generated in the root of a training output folder.

  • scaler_X_file – Location and name of a scaler_X.pkl fit scaler file which was generated with the trained model_file.

  • scaler_y_file – Location and name of a scaler_y.pkl fit scaler file which was generated with the trained model_file.

  • building_params_folder – The folder location containing all building parameter files which will have predictions made on by the provided model.

  • start_date – The start date to specify the start of which weather data is attached to the building data. Expects the input to be in the form Month_number-Day_number.

  • end_date – The end date to specify the end of which weather data is attached to the building data. Expects the input to be in the form Month_number-Day_number.

  • selected_features_file – Location and name of a .json feature selection file to be used if the feature selection is skipped.

run_model.main(config_file=<typer.models.ArgumentInfo object>, energy_model_file=<typer.models.OptionInfo object>, energy_ohe_file=<typer.models.OptionInfo object>, energy_cleaned_columns_file=<typer.models.OptionInfo object>, energy_scaler_X_file=<typer.models.OptionInfo object>, energy_scaler_y_file=<typer.models.OptionInfo object>, energy_selected_features_file=<typer.models.OptionInfo object>, costing_model_file=<typer.models.OptionInfo object>, costing_ohe_file=<typer.models.OptionInfo object>, costing_cleaned_columns_file=<typer.models.OptionInfo object>, costing_scaler_X_file=<typer.models.OptionInfo object>, costing_scaler_y_file=<typer.models.OptionInfo object>, costing_selected_features_file=<typer.models.OptionInfo object>, building_params_folder=<typer.models.OptionInfo object>, start_date=<typer.models.OptionInfo object>, end_date=<typer.models.OptionInfo object>, selected_model_type=<typer.models.OptionInfo object>)

Preprocess a set of input building files to obtain a dataset to obtain daily energy and total costing predictions for. The feature selection file that has been used with the trained model must be included to appropriately preprocess the data. The start/end dates to be spanned are specified within the provided config_file or through the CLI, but it is assumed that each day within an arbitrary year will receive predictions. A trained Keras model must be provided as input to perform the predictions on the data. These predictions will be output into a .csv file which follows the format of the input files which are used to train the models. The energy outputs will be for daily energy values rather than hourly energy values, where outputs represent the total energy output observed from generated energy files from rows without the Electricity:Facility Name.

Parameters:
  • config_file (str) – Location of the .yml config file (default name is input_config.yml).

  • energy_model_file (str) – Location and name of a .h5 trained keras model to be used for training. From the energy training.

  • energy_ohe_file (str) – Location and name of a ohe.pkl OneHotEncoder file which was generated in the root of a training output folder. From the energy training.

  • energy_cleaned_columns_file (str) – Location and name of a cleaned_columns.json file which was generated in the root of a training output folder. From the energy training.

  • energy_scaler_X_file (str) – Location and name of a scaler_X.pkl fit scaler file which was generated with the trained model_file. From the energy training.

  • energy_scaler_y_file (str) – Location and name of a scaler_y.pkl fit scaler file which was generated with the trained model_file. From the energy training.

  • energy_selected_features_file (str) – Location and name of a .json feature selection file to be used if the feature selection is skipped. From the energy training.

  • costing_model_file (str) – Location and name of a .h5 trained keras model to be used for training. From the costing training.

  • costing_ohe_file (str) – Location and name of a ohe.pkl OneHotEncoder file which was generated in the root of a training output folder. From the costing training.

  • costing_cleaned_columns_file (str) – Location and name of a cleaned_columns.json file which was generated in the root of a training output folder. From the costing training.

  • costing_scaler_X_file (str) – Location and name of a scaler_X.pkl fit scaler file which was generated with the trained model_file. From the costing training.

  • costing_scaler_y_file (str) – Location and name of a scaler_y.pkl fit scaler file which was generated with the trained model_file. From the costing training.

  • costing_selected_features_file (str) – Location and name of a .json feature selection file to be used if the feature selection is skipped. From the costing training.

  • building_params_folder (str) – The folder location containing all building parameter files which will have predictions made on by the provided model.

  • start_date (str) – The start date to specify the start of which weather data is attached to the building data. Expects the input to be in the form Month_number-Day_number.

  • end_date (str) – The end date to specify the end of which weather data is attached to the building data. Expects the input to be in the form Month_number-Day_number.

  • selected_model_type (str) – Type of model selected. can either be ‘mlp’ for Multilayer Perceptron or ‘rf’ for Random Forest

Return type:

None