Building Dataset Partition#
smart_control.dataset.partition.BuildingDatasetPartition
#
A helper class for handling a specific dataset partition. A partition is a subset of the building's data over a specific time period.
The partition contains information about observations, actions, and rewards for each time step:
- observation: information the agent receives from the environment
- action: a decision the agent makes to interact with the environment
- reward info: feedback from the environment indicating the agent's performance, contains information needed to compute the reward
- reward: results from passing the raw reward info through the reward function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset
|
BuildingDataset
|
The building dataset. |
required |
partition_id
|
str
|
The identifier of a partition in the specified dataset (e.g. "2022_a"). |
required |
Example
action_ids
cached
property
#
A list of unique action identifiers.
Action identifiers are in the format of device_id@field_name
.
For example: '12945159110931775488@supply_air_temperature_setpoint'
.
action_timestamps
cached
property
#
A list of sequential timestamps representing the time of each action.
actions_df
cached
property
#
A time-series dataframe of numeric action values, constructed from the following components:
- Columns are the
action_ids
- Row indices are the
action_timestamps
- Cell values are from the
action_value_matrix
Returns:
Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DataFrame
|
A
|
observation_ids
cached
property
#
A list of unique observation identifiers.
Observation identifiers are in the format of device_id@field_name
.
For example: '2640423556868160@zone_air_temperature_sensor'
.
observation_timestamps
cached
property
#
A list of sequential timestamps representing the time of each observation.
observation_value_matrix
cached
property
#
Time-series observation data.
observations_df
cached
property
#
A time-series dataframe of numeric observation values, constructed from the following components:
- Columns are the
observation_ids
- Row indices are the
observation_timestamps
- Cell values are from the
observation_value_matrix
Returns:
Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DataFrame
|
A
|
reward_info_ids
cached
property
#
A list of unique reward info identifiers.
See: RewardInfo
in "smart_control/proto/smart_control_reward.proto".
Reward info identifiers are in the format of device_id@field_name
or
zone_id@field_name
.
For example:
'rooms/9028552126@heating_setpoint_temperature'
'14409954889734029312@air_conditioning_electrical_energy_rate'
reward_info_timestamps
cached
property
#
A list of sequential timestamps related to reward information.
reward_info_value_matrix
cached
property
#
Time series reward information data.
reward_infos_df
cached
property
#
A time-series dataframe of numeric reward info values, constructed from the following components:
- Columns are the
reward_info_ids
- Row indices are the
reward_info_timestamps
- Cell values are from the
reward_info_value_matrix
Returns:
Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DataFrame
|
A
|
reward_ids
cached
property
#
A list of unique reward identifiers.
See: RewardResponse
in "smart_control/proto/smart_control_reward.proto".
Returns:
Type | Description |
---|---|
list[str]
|
A list of the reward identifiers: [ "agent_reward_value", "productivity_reward", "electricity_energy_cost", "natural_gas_energy_cost", "carbon_emitted", "carbon_cost", "productivity_weight", "energy_cost_weight", "carbon_emission_weight", "person_productivity", "total_occupancy", "reward_scale", "reward_shift", "productivity_regret", "normalized_productivity_regret", "normalized_energy_cost", "normalized_carbon_emission" ] |
reward_timestamps
cached
property
#
A list of sequential timestamps representing the time of each reward.
rewards_df
cached
property
#
A time-series dataframe of numeric reward values, constructed from the following components:
- Columns are the
reward_ids
- Row indices are the
reward_timestamps
- Cell values are from the
reward_value_matrix
Returns:
Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DataFrame
|
A
|