Inverse Model
InverseModel
Source code in src/openstudio_hpxml_calibration/weather_normalization/inverse_model.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
__init__(hpxml, user_config, building_id=None)
Initialize the InverseModel for weather normalization.
Sets up regression models and bill data for each fuel type based on the HPXML document.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
hpxml
|
HpxmlDoc
|
HPXML document object. |
required |
user_config
|
dict
|
Optional user configuration dictionary. |
required |
Source code in src/openstudio_hpxml_calibration/weather_normalization/inverse_model.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
get_model(fuel_type)
Retrieve or fit the regression model for a given fuel type.
This method returns the regression model for the specified fuel type, fitting it if necessary using the bill and weather data from the HPXML document.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fuel_type
|
FuelType
|
The fuel type for which to retrieve or fit the regression model. |
required |
Returns:
Type | Description |
---|---|
UtilityBillRegressionModel
|
The fitted regression model for the specified fuel type. |
Source code in src/openstudio_hpxml_calibration/weather_normalization/inverse_model.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
predict_epw_daily(fuel_type)
Predict daily energy consumption using the regression model for a given fuel type.
Uses the fitted regression model to estimate daily consumption for each day in the EPW weather file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fuel_type
|
FuelType
|
The fuel type for which to predict daily consumption. |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
Array of predicted daily consumption values. |
Source code in src/openstudio_hpxml_calibration/weather_normalization/inverse_model.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|