You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Base class for configuration management. This class should **not** be used directly. Instead, use one of its derived classes, such as [`SeriesBasedConfig`][cesnet_tszoo.configs.series_based_config.SeriesBasedConfig] or [`TimeBasedConfig`][cesnet_tszoo.configs.time_based_config.TimeBasedConfig].
28
+
Base class for configuration management. This class should **not** be used directly. Instead, use one of its derived classes, such as TimeBasedConfig, DisjointTimeBasedConfig or SeriesBasedConfig.
29
29
30
30
For available configuration options, refer to [here][cesnet_tszoo.configs.base_config.DatasetConfig--configuration-options].
31
31
@@ -35,9 +35,13 @@ class DatasetConfig(ABC):
35
35
used_test_workers: Tracks the number of test workers in use. Helps determine if the test dataloader should be recreated based on worker changes.
36
36
used_all_workers: Tracks the total number of all workers in use. Helps determine if the all dataloader should be recreated based on worker changes.
37
37
import_identifier: Tracks the name of the config upon import. None if not imported.
38
+
filler_factory: Represents factory used to create passed Filler type.
39
+
anomaly_handler_factory: Represents factory used to create passed Anomaly Handler type.
40
+
transformer_factory: Represents factory used to create passed Transformer type.
41
+
can_fit_fillers: Whether fillers in this config, can be fitted.
38
42
logger: Logger for displaying information.
39
43
40
-
The following attributes are initialized when [`set_dataset_config_and_initialize`][cesnet_tszoo.datasets.cesnet_dataset.CesnetDataset.set_dataset_config_and_initialize] is called:
44
+
The following attributes are initialized when CesnetDataset.set_dataset_config_and_initialize is called:
41
45
42
46
Attributes:
43
47
aggregation: The aggregation period used for the data.
@@ -49,13 +53,11 @@ class DatasetConfig(ABC):
49
53
used_singular_train_time_series: Currently used singular train set time series for dataloader.
50
54
used_singular_val_time_series: Currently used singular validation set time series for dataloader.
51
55
used_singular_test_time_series: Currently used singular test set time series for dataloader.
52
-
used_singular_all_time_series: Currently used singular all set time series for dataloader.
53
-
transformers: Prepared transformers for fitting/transforming. Can be one transformer, array of transformers or `None`.
54
-
train_fillers: Fillers used in the train set. `None` if no filler is used or train set is not used.
55
-
val_fillers: Fillers used in the validation set. `None` if no filler is used or validation set is not used.
56
-
test_fillers: Fillers used in the test set. `None` if no filler is used or test set is not used.
57
-
all_fillers: Fillers used for the all set. `None` if no filler is used or all set is not used.
58
-
anomaly_handlers: Prepared anomaly handlers for fitting/handling anomalies. Can be array of anomaly handlers or `None`.
56
+
used_singular_all_time_series: Currently used singular all set time series for dataloader.
57
+
train_preprocess_order: All preprocesses used for train set.
58
+
val_preprocess_order: All preprocesses used for val set.
59
+
test_preprocess_order: All preprocesses used for test set.
60
+
all_preprocess_order: All preprocesses used for all set.
59
61
is_initialized: Flag indicating if the configuration has already been initialized. If true, config initialization will be skipped.
60
62
version: Version of cesnet-tszoo this config was made in.
61
63
export_update_needed: Whether config was updated to newer version and should be exported.
@@ -69,7 +71,8 @@ class DatasetConfig(ABC):
69
71
val_batch_size: Batch size for the validation dataloader, when window size is None.
70
72
test_batch_size: Batch size for the test dataloader, when window size is None.
71
73
all_batch_size: Batch size for the all dataloader, when window size is None.
72
-
fill_missing_with: Defines how to fill missing values in the dataset. Can pass enum [`FillerType`][cesnet_tszoo.utils.enums.FillerType] for built-in filler or pass a type of custom filler that must derive from [`Filler`][cesnet_tszoo.utils.filler.Filler] base class.
74
+
preprocess_order: Defines in which order preprocesses are used. Also can add to order a type of PerSeriesCustomHandler, AllSeriesCustomHandler or NoFitCustomHandler.
75
+
fill_missing_with: Defines how to fill missing values in the dataset. Can pass enum [`FillerType`][cesnet_tszoo.utils.enums.FillerType] for built-in filler or pass a type of custom filler that must derive from [`Filler`][cesnet_tszoo.utils.filler.filler.Filler] base class.
73
76
transform_with: Defines the transformer to transform the dataset. Can pass enum [`TransformerType`][cesnet_tszoo.utils.enums.TransformerType] for built-in transformer, pass a type of custom transformer or instance of already fitted transformer(s).
74
77
handle_anomalies_with: Defines the anomaly handler for handling anomalies in the dataset. Can pass enum [`AnomalyHandlerType`][cesnet_tszoo.utils.enums.AnomalyHandlerType] for built-in anomaly handler or a type of custom anomaly handler.
75
78
partial_fit_initialized_transformers: If `True`, partial fitting on train set is performed when using initiliazed transformers.
- Custom fillers must inherit from the [`fillers`][cesnet_tszoo.utils.filler.Filler] base class.
39
-
- Custom anomaly handlers must inherit from the [`anomaly handlers`][cesnet_tszoo.utils.anomaly_handler.AnomalyHandler] base class.
40
+
- Custom fillers must inherit from the [`fillers`][cesnet_tszoo.utils.filler.filler.Filler] base class.
41
+
- Custom anomaly handlers must inherit from the [`anomaly handlers`][cesnet_tszoo.utils.anomaly_handler.anomaly_handler.AnomalyHandler] base class.
40
42
- Selected anomaly handler is only used for train set.
41
-
- It is recommended to use the [`transformers`][cesnet_tszoo.utils.transformer.Transformer] base class, though this is not mandatory as long as it meets the required methods.
43
+
- It is recommended to use the [`transformers`][cesnet_tszoo.utils.transformer.transformer.Transformer] base class, though this is not mandatory as long as it meets the required methods.
42
44
- If a transformer is already initialized and `partial_fit_initialized_transformers` is `False`, the transformer does not require `partial_fit`.
43
45
- Otherwise, the transformer must support `partial_fit`.
44
46
- Transformers must implement `transform` method.
45
47
- Both `partial_fit` and `transform` methods must accept an input of type `np.ndarray` with shape `(times, features)`.
48
+
- Custom handlers must be derived from one of the built-in [`custom handler`][cesnet_tszoo.utils.custom_handler.custom_handler] classes
46
49
- `train_time_period`, `val_time_period`, `test_time_period` can overlap, but they should keep order of `train_time_period` < `val_time_period` < `test_time_period`
47
50
48
51
For available configuration options, refer to [here][cesnet_tszoo.configs.disjoint_time_based_config.DisjointTimeBasedConfig--configuration-options].
@@ -54,6 +57,10 @@ class DisjointTimeBasedConfig(SeriesBasedHandler, TimeBasedHandler, DatasetConfi
54
57
uses_all_time_period: Whether all time period set should be used.
55
58
uses_all_ts: Whether all time series set should be used.
56
59
import_identifier: Tracks the name of the config upon import. None if not imported.
60
+
filler_factory: Represents factory used to create passed Filler type.
61
+
anomaly_handler_factory: Represents factory used to create passed Anomaly Handler type.
62
+
transformer_factory: Represents factory used to create passed Transformer type.
63
+
can_fit_fillers: Whether fillers in this config, can be fitted.
57
64
logger: Logger for displaying information.
58
65
59
66
The following attributes are initialized when [`set_dataset_config_and_initialize`][cesnet_tszoo.datasets.disjoint_time_based_cesnet_dataset.DisjointTimeBasedCesnetDataset.set_dataset_config_and_initialize] is called:
@@ -78,12 +85,9 @@ class DisjointTimeBasedConfig(SeriesBasedHandler, TimeBasedHandler, DatasetConfi
78
85
used_singular_train_time_series: Currently used singular train set time series for dataloader.
79
86
used_singular_val_time_series: Currently used singular validation set time series for dataloader.
80
87
used_singular_test_time_series: Currently used singular test set time series for dataloader.
81
-
transformers: Prepared transformers for fitting/transforming. Can be one transformer, array of transformers or `None`.
82
-
train_fillers: Fillers used in the train set. `None` if no filler is used or train set is not used.
83
-
val_fillers: Fillers used in the validation set. `None` if no filler is used or validation set is not used.
84
-
test_fillers: Fillers used in the test set. `None` if no filler is used or test set is not used.
85
-
all_fillers: Fillers used for the all set.
86
-
anomaly_handlers: Prepared anomaly handlers for fitting/handling anomalies. Can be array of anomaly handlers or `None`.
88
+
train_preprocess_order: All preprocesses used for train set.
89
+
val_preprocess_order: All preprocesses used for val set.
90
+
test_preprocess_order: All preprocesses used for test set.
87
91
is_initialized: Flag indicating if the configuration has already been initialized. If true, config initialization will be skipped.
88
92
version: Version of cesnet-tszoo this config was made in.
89
93
export_update_needed: Whether config was updated to newer version and should be exported.
@@ -107,7 +111,8 @@ class DisjointTimeBasedConfig(SeriesBasedHandler, TimeBasedHandler, DatasetConfi
107
111
train_batch_size: Batch size for the train dataloader. Affects number of returned times in one batch. `Default: 32`
108
112
val_batch_size: Batch size for the validation dataloader. Affects number of returned times in one batch. `Default: 64`
109
113
test_batch_size: Batch size for the test dataloader. Affects number of returned times in one batch. `Default: 128`
110
-
fill_missing_with: Defines how to fill missing values in the dataset. Can pass enum [`FillerType`][cesnet_tszoo.utils.enums.FillerType] for built-in filler or pass a type of custom filler that must derive from [`Filler`][cesnet_tszoo.utils.filler.Filler] base class. `Default: None`
114
+
preprocess_order: Defines in which order preprocesses are used. Also can add to order a type of [`AllSeriesCustomHandler`][cesnet_tszoo.utils.custom_handler.AllSeriesCustomHandler] or [`NoFitCustomHandler`][cesnet_tszoo.utils.custom_handler.NoFitCustomHandler]. `Default: ["handling_anomalies", "filling_gaps", "transforming"]`
115
+
fill_missing_with: Defines how to fill missing values in the dataset. Can pass enum [`FillerType`][cesnet_tszoo.utils.enums.FillerType] for built-in filler or pass a type of custom filler that must derive from [`Filler`][cesnet_tszoo.utils.filler.filler.Filler] base class. `Default: None`
111
116
transform_with: Defines the transformer used to transform the dataset. Can pass enum [`TransformerType`][cesnet_tszoo.utils.enums.TransformerType] for built-in transformer, pass a type of custom transformer or instance of already fitted transformer(s). `Default: None`
112
117
handle_anomalies_with: Defines the anomaly handler for handling anomalies in the train set. Can pass enum [`AnomalyHandlerType`][cesnet_tszoo.utils.enums.AnomalyHandlerType] for built-in anomaly handler or a type of custom anomaly handler. `Default: None`
113
118
partial_fit_initialized_transformers: If `True`, partial fitting on train set is performed when using initiliazed transformers. `Default: False`
0 commit comments