Shared Attributes¶
Description¶
The seamless interaction between research modules is enabled by shared attributes defined in the ResearchAttributes class. This class contains attributes that are used across the research modules through inheritance.
Class¶
- class ResearchAttributes(label_type=None, class_names=None)¶
Store attributes shared between modules in the research package.
- __init__(label_type=None, class_names=None)¶
Initialize the ResearchAttributes class.
- Parameters:
label_type (str or None) – The type of labels used: ‘binary’, ‘multi_class’, ‘multi_label’, ‘multi_label_multi_class’, ‘object_detection’. If None, label_manager is set to None.
class_names (list or None) – The list of class names.
- datasets_container¶
Dictionary containing datasets. When creating new datasets, ‘complete_dataset’ is added; when split, ‘train_dataset’, ‘val_dataset’, and ‘test_dataset’ are added.
- Type:
dict
- label_manager¶
LabelManager instance for handling labels.
- Type:
LabelManager
- outputs_container¶
Dictionary containing outputs in the form of tuples (y_true, y_pred). Keys follow the pattern: dataset name with ‘dataset’ replaced by ‘outputs’.
- Type:
dict
- model¶
The Keras model instance.
- Type:
tf.keras.Model
- training_history¶
Dictionary tracking the training history of the model after fitting.
- Type:
dict
- evaluation_metrics¶
Tracked evaluation metrics of the model after evaluating. Format: {Set_Name: {Metric: Value}}.
- Type:
dict
- figures¶
Dictionary containing tracked figures. Format: {figure_name: figure}.
- Type:
dict
- synchronize_research_attributes(research_attributes)¶
Synchronize research attributes with another ResearchAttributes instance.
- Parameters:
research_attributes (ResearchAttributes) – The instance to synchronize with.
- reset_research_attributes(except_datasets=False)¶
Reset research attributes while preserving the label manager.
- Parameters:
except_datasets (bool) – If True, datasets are not reset. Defaults to False.