Oracle is a unified framework for normalization of buildings metadata. Different frameworks can be unified into a workflow and/or compared with each other in Oracle.
-
Every BMS point is associated with a unique source identifier (srcid).
-
All BMS metadata is in the form of a table in CSV. A BMS point corresponds to a row with metadata possibly in multiple columns. Example:
SourceIdentifier VendorGivenName BACNetName BACNetUnit 123-456 RM-101.ZNT VAV101 ZoneTemp 64
- Each row in the table has corresponding Brick triples.
- E.g.,
ex:RM_101_ZNT rdf:type brick:Zone_Temperature_Sensor . ex:RM_101 rdf:type brick:Room . ex:RM_101_ZNT bf:hasLocation ex:RM_101 .
- Framework interface has abstraction of interacting these triples.
- E.g.,
- Each cell has parsing results. An example for 123456.VendorGivenName:
- Tokenization:
["RM", "-", "101", ".", "ZN", "T"]
- Token Labels:
["Room", None, "left-identifier", None, "Zone", "Temperature"]
- Though Oracle by default supports the above token-label sets, different tokenization rules may apply from a framework. For example, one may want to use
ZNT -> Zone_Temperature_Sensor
. Such combinations can be extended later.
- Tokenization:
- One may use a part of different label types or add a new label type if needed.
- Every BMS point may produce a timeseries data associated with the corresponding srcid.
- Its data format is TODO.
- Result graph in Brick (in Turtle syntax).
- A map of confidence of triples.
- A key is a triple in string and the value is its confidence. If the triple is given by the user, it should be 1.0. E.g.,
{ ("ex:znt", "rdf:type", "brick:Zone_Temperature_Sensor"): 0.9, .. }
- A key is a triple in string and the value is its confidence. If the triple is given by the user, it should be 1.0. E.g.,
- Each framework should be instantiated as the common interface.
- Prepare the data in MongoDB. Example:
data_init.py
- The number of seed samples are given and a framework is initialized with the number as well as the other configurations, which depend on the framework as different framework may require different initial inputs.
conf = { 'source_buildings': ['ebu3b'], 'source_samples_list': [5], 'logger_postfix': 'test1', 'seed_num': 5} target_building = 'ap_m' scrabble = ScrabbleInterface(target_building, conf)
- Start learning the entire building's metadata with the instance.
Each step inside
scrabble.learn_auto() # This function name may change in the near future.
learn_auto()
looks like this:- Pick most informative samples in the target building.
# this code is different from acutal Scrabble code as it internally contains all the process. new_srcids = self.scrabble.select_informative_samples(10)
- Update the model
self.update_model(new_srcids)
- Infer with the update model
pred = self.scrabble.predict(self.target_srcids)
- Store the current model's performance.
self.evaluate()
- Pick most informative samples in the target building.
- Each framework aligned to the interface (
./Oracle/frameworks/framework_interface.py
) can be a part, called Block, of a workflow to Brickify a building. - Workflow/Block interface is defined under TODO.
- Workflow usage scenario:
- Each part is initiated with the raw data for target buildings in the format described in Data Format.
- In each iteration, each part runs algorithm sequentially.
- In each part, it receieves the result from the previous part and samples from an expert if necessary.
- Oracle also can be used to benchamrk different algorithms. It defines the common dataset and interactions with the expert providing learning samples.
- Benchmark usage scenario.
-
Initialize data
python data_init.py -b ap_m
-
Test with Zodiac
python test_zodiac.py