![]() |
Belle II Software release-09-00-03
|


Public Member Functions | |
| def | __init__ (self, output_file, flag_file) |
| def | initialize (self) |
| def | event (self) |
| def | terminate (self) |
Public Attributes | |
| output_file | |
| Filename to save training data to. | |
| flag_list | |
| Filename of the flag file indicating passing events. | |
| fast_mode | |
| Whether use fast mode or advanced mode. | |
| eventInfo | |
| Initialise event metadata from data store. | |
| eventExtraInfo | |
| Initialise event extra info from data store. | |
| df_dict | |
| Pandas dataframe to save particle features. | |
Save MCParticles to Pandas Dataframe.
Arguments:
output_file (str): Filename to save training data.
Ending with ``parquet`` indicating fast mode, which will generate the final parquet file for training.
Ending with ``h5`` indicating advanced mode, which will produce a temperary h5 file for further preprocessing.
flag_file (str): Filename of the flag file indicating passing events.
Returns:
None
Definition at line 68 of file NN_trainer_module.py.
| def __init__ | ( | self, | |
| output_file, | |||
| flag_file | |||
| ) |
Initialize the TrainDataSaver module. :param output_file: Filename to save training data to. :param flag_file: Filename of the flag file indicating passing events.
Definition at line 82 of file NN_trainer_module.py.
| def event | ( | self | ) |
Process each event and append event information to the dictionary.
Definition at line 116 of file NN_trainer_module.py.
| def initialize | ( | self | ) |
Initialize the data store and the dictionary to save particle features before processing events.
Definition at line 105 of file NN_trainer_module.py.
| def terminate | ( | self | ) |
Append events on disk in either of the two different ways and free memory. In fast mode, the dataframe containing particle-level information and skim labels is preprocessed and saved as a parquet file which is ready for NN training. In advanced mode, the dataframe is saved as a h5 file and waits for combination with event-level information before preprocessing.
Definition at line 126 of file NN_trainer_module.py.
| df_dict |
Pandas dataframe to save particle features.
Definition at line 114 of file NN_trainer_module.py.
| eventExtraInfo |
Initialise event extra info from data store.
Definition at line 112 of file NN_trainer_module.py.
| eventInfo |
Initialise event metadata from data store.
Definition at line 110 of file NN_trainer_module.py.
| fast_mode |
Whether use fast mode or advanced mode.
Definition at line 99 of file NN_trainer_module.py.
| flag_list |
Filename of the flag file indicating passing events.
Definition at line 97 of file NN_trainer_module.py.
| output_file |
Filename to save training data to.
Definition at line 95 of file NN_trainer_module.py.