Model
- class OBLib.Model.Model[source]
Bases:
objectAbstract model class. This is the top-level class and should not be used directly. Instead this class is inherited by other more specialised model classes.
- property inputs
The model inputs. Access this object to change the model inputs.
Read-only property.
- Return type
- class OBLib.Model.Inputs[source]
Bases:
objectAbstract model inputs class. This is the top-level class and should not be used directly. Instead this class is inherited by other more specialised model inputs classes.
- set_timestamps(start=None, end=None, *args, **kwargs)[source]
Convenience method to set the
timestampsproperty.- Parameters
The remaining input arguments here are passed to the
pandas.date_rangemethod. See the pandas documentation for details.Typcial inputs might be:
start=(2021,1,1,0,0) (i.e. 1st January 2021)
freq=’H’ (for hourly intervals)
periods=24 (to generate 1 day of hourly intervals)
- Return type
- property timestamps
The input timestamps. Model predictions will be made for each timestamp.
Read / write property.
- Return type
- class OBLib.Model.Outputs[source]
Bases:
objectAbstract model outputs class. This is the top-level class and should not be used directly. Instead this class is inherited by other more specialised model outputs classes.
- property data
The model predictions.
Read-only property.
- Returns
A dictionary of the model results. Key-value pairs are: keys -> the name of the quantity or variable; values -> a list of the model predictions (this list aligns with the output timestamps).
- Return type
- property df
A Pandas dataframe of the timestamps and data.
Read-only property.
- Returns
A dataframe with: index -> timestamps; columns -> ‘data’ keys; values ->
datavalues.- Return type
- property timestamps
The outputs timestamps.
Read-only property.
- Return type