dragon-ml-toolbox 14.8.0__py3-none-any.whl → 16.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dragon-ml-toolbox might be problematic. Click here for more details.

Files changed (44) hide show
  1. {dragon_ml_toolbox-14.8.0.dist-info → dragon_ml_toolbox-16.0.0.dist-info}/METADATA +9 -5
  2. dragon_ml_toolbox-16.0.0.dist-info/RECORD +51 -0
  3. ml_tools/ETL_cleaning.py +20 -20
  4. ml_tools/ETL_engineering.py +23 -25
  5. ml_tools/GUI_tools.py +20 -20
  6. ml_tools/MICE_imputation.py +3 -3
  7. ml_tools/ML_callbacks.py +43 -26
  8. ml_tools/ML_configuration.py +204 -11
  9. ml_tools/ML_datasetmaster.py +198 -280
  10. ml_tools/ML_evaluation.py +132 -41
  11. ml_tools/ML_evaluation_multi.py +96 -35
  12. ml_tools/ML_inference.py +249 -207
  13. ml_tools/ML_models.py +13 -102
  14. ml_tools/ML_models_advanced.py +1 -1
  15. ml_tools/ML_optimization.py +12 -12
  16. ml_tools/ML_scaler.py +11 -11
  17. ml_tools/ML_sequence_datasetmaster.py +341 -0
  18. ml_tools/ML_sequence_evaluation.py +215 -0
  19. ml_tools/ML_sequence_inference.py +391 -0
  20. ml_tools/ML_sequence_models.py +139 -0
  21. ml_tools/ML_trainer.py +1237 -354
  22. ml_tools/ML_utilities.py +1 -1
  23. ml_tools/ML_vision_datasetmaster.py +73 -67
  24. ml_tools/ML_vision_evaluation.py +26 -6
  25. ml_tools/ML_vision_inference.py +117 -140
  26. ml_tools/ML_vision_models.py +1 -1
  27. ml_tools/ML_vision_transformers.py +121 -40
  28. ml_tools/PSO_optimization.py +6 -6
  29. ml_tools/SQL.py +4 -4
  30. ml_tools/{keys.py → _keys.py} +43 -0
  31. ml_tools/_schema.py +1 -1
  32. ml_tools/ensemble_evaluation.py +1 -1
  33. ml_tools/ensemble_inference.py +7 -33
  34. ml_tools/ensemble_learning.py +1 -1
  35. ml_tools/optimization_tools.py +2 -2
  36. ml_tools/path_manager.py +5 -5
  37. ml_tools/utilities.py +1 -2
  38. dragon_ml_toolbox-14.8.0.dist-info/RECORD +0 -49
  39. ml_tools/RNN_forecast.py +0 -56
  40. ml_tools/_ML_vision_recipe.py +0 -88
  41. {dragon_ml_toolbox-14.8.0.dist-info → dragon_ml_toolbox-16.0.0.dist-info}/WHEEL +0 -0
  42. {dragon_ml_toolbox-14.8.0.dist-info → dragon_ml_toolbox-16.0.0.dist-info}/licenses/LICENSE +0 -0
  43. {dragon_ml_toolbox-14.8.0.dist-info → dragon_ml_toolbox-16.0.0.dist-info}/licenses/LICENSE-THIRD-PARTY.md +0 -0
  44. {dragon_ml_toolbox-14.8.0.dist-info → dragon_ml_toolbox-16.0.0.dist-info}/top_level.txt +0 -0
ml_tools/ML_callbacks.py CHANGED
@@ -4,23 +4,22 @@ from tqdm.auto import tqdm
4
4
  from typing import Union, Literal, Optional
5
5
  from pathlib import Path
6
6
 
7
- from .path_manager import make_fullpath, sanitize_filename
8
- from .keys import PyTorchLogKeys, PyTorchCheckpointKeys
7
+ from .path_manager import make_fullpath
8
+ from ._keys import PyTorchLogKeys, PyTorchCheckpointKeys
9
9
  from ._logger import _LOGGER
10
10
  from ._script_info import _script_info
11
11
 
12
12
 
13
13
  __all__ = [
14
- "Callback",
15
14
  "History",
16
15
  "TqdmProgressBar",
17
- "EarlyStopping",
18
- "ModelCheckpoint",
19
- "LRScheduler"
16
+ "DragonEarlyStopping",
17
+ "DragonModelCheckpoint",
18
+ "DragonLRScheduler"
20
19
  ]
21
20
 
22
21
 
23
- class Callback:
22
+ class _Callback:
24
23
  """
25
24
  Abstract base class used to build new callbacks.
26
25
 
@@ -60,7 +59,7 @@ class Callback:
60
59
  pass
61
60
 
62
61
 
63
- class History(Callback):
62
+ class History(_Callback):
64
63
  """
65
64
  Callback that records events into a `history` dictionary.
66
65
 
@@ -79,7 +78,7 @@ class History(Callback):
79
78
  self.trainer.history.setdefault(k, []).append(v) # type: ignore
80
79
 
81
80
 
82
- class TqdmProgressBar(Callback):
81
+ class TqdmProgressBar(_Callback):
83
82
  """Callback that provides a tqdm progress bar for training."""
84
83
  def __init__(self):
85
84
  self.epoch_bar = None
@@ -110,7 +109,7 @@ class TqdmProgressBar(Callback):
110
109
  self.epoch_bar.close() # type: ignore
111
110
 
112
111
 
113
- class EarlyStopping(Callback):
112
+ class DragonEarlyStopping(_Callback):
114
113
  """
115
114
  Stop training when a monitored metric has stopped improving.
116
115
  """
@@ -187,11 +186,11 @@ class EarlyStopping(Callback):
187
186
  _LOGGER.info(f"Epoch {epoch+1}: early stopping after {self.wait} epochs with no improvement.")
188
187
 
189
188
 
190
- class ModelCheckpoint(Callback):
189
+ class DragonModelCheckpoint(_Callback):
191
190
  """
192
191
  Saves the model weights, optimizer state, LR scheduler state (if any), and epoch number to a directory with automated filename generation and rotation.
193
192
  """
194
- def __init__(self, save_dir: Union[str,Path], checkpoint_name: Optional[str]=None, monitor: str = PyTorchLogKeys.VAL_LOSS,
193
+ def __init__(self, save_dir: Union[str,Path], monitor: str = PyTorchLogKeys.VAL_LOSS,
195
194
  save_best_only: bool = True, mode: Literal['auto', 'min', 'max']= 'auto', verbose: int = 0):
196
195
  """
197
196
  - If `save_best_only` is True, it saves the single best model, deleting the previous best.
@@ -199,7 +198,6 @@ class ModelCheckpoint(Callback):
199
198
 
200
199
  Args:
201
200
  save_dir (str): Directory where checkpoint files will be saved.
202
- checkpoint_name (str| None): If None, the filename will include the epoch and score.
203
201
  monitor (str): Metric to monitor.
204
202
  save_best_only (bool): If true, save only the best model.
205
203
  mode (str): One of {'auto', 'min', 'max'}.
@@ -215,9 +213,8 @@ class ModelCheckpoint(Callback):
215
213
  self.monitor = monitor
216
214
  self.save_best_only = save_best_only
217
215
  self.verbose = verbose
218
- if checkpoint_name:
219
- checkpoint_name = sanitize_filename(checkpoint_name)
220
- self.checkpoint_name = checkpoint_name
216
+ self._latest_checkpoint_path = None
217
+ self._checkpoint_name = PyTorchCheckpointKeys.CHECKPOINT_NAME
221
218
 
222
219
  # State variables to be managed during training
223
220
  self.saved_checkpoints = []
@@ -261,10 +258,7 @@ class ModelCheckpoint(Callback):
261
258
  old_best_str = f"{self.best:.4f}" if self.best not in [np.inf, -np.inf] else "inf"
262
259
 
263
260
  # Create a descriptive filename
264
- if self.checkpoint_name is None:
265
- filename = f"epoch_{epoch}-{self.monitor}_{current:.4f}.pth"
266
- else:
267
- filename = f"epoch{epoch}_{self.checkpoint_name}.pth"
261
+ filename = f"epoch{epoch}_{self._checkpoint_name}_{current:.4f}.pth"
268
262
  new_filepath = self.save_dir / filename
269
263
 
270
264
  if self.verbose > 0:
@@ -279,6 +273,7 @@ class ModelCheckpoint(Callback):
279
273
  PyTorchCheckpointKeys.MODEL_STATE: self.trainer.model.state_dict(), # type: ignore
280
274
  PyTorchCheckpointKeys.OPTIMIZER_STATE: self.trainer.optimizer.state_dict(), # type: ignore
281
275
  PyTorchCheckpointKeys.BEST_SCORE: self.best,
276
+ PyTorchCheckpointKeys.HISTORY: self.trainer.history, # type: ignore
282
277
  }
283
278
 
284
279
  # Check for scheduler
@@ -287,6 +282,7 @@ class ModelCheckpoint(Callback):
287
282
 
288
283
  # Save the new best model
289
284
  torch.save(checkpoint_data, new_filepath)
285
+ self._latest_checkpoint_path = new_filepath
290
286
 
291
287
  # Delete the old best model file
292
288
  if self.last_best_filepath and self.last_best_filepath.exists():
@@ -298,10 +294,8 @@ class ModelCheckpoint(Callback):
298
294
  def _save_rolling_checkpoints(self, epoch, logs):
299
295
  """Saves the latest model and keeps only the most recent ones."""
300
296
  current = logs.get(self.monitor)
301
- if self.checkpoint_name is None:
302
- filename = f"epoch_{epoch}-{self.monitor}_{current:.4f}.pth"
303
- else:
304
- filename = f"epoch{epoch}_{self.checkpoint_name}.pth"
297
+
298
+ filename = f"epoch{epoch}_{self._checkpoint_name}_{current:.4f}.pth"
305
299
  filepath = self.save_dir / filename
306
300
 
307
301
  if self.verbose > 0:
@@ -313,12 +307,15 @@ class ModelCheckpoint(Callback):
313
307
  PyTorchCheckpointKeys.MODEL_STATE: self.trainer.model.state_dict(), # type: ignore
314
308
  PyTorchCheckpointKeys.OPTIMIZER_STATE: self.trainer.optimizer.state_dict(), # type: ignore
315
309
  PyTorchCheckpointKeys.BEST_SCORE: self.best, # Save the current best score
310
+ PyTorchCheckpointKeys.HISTORY: self.trainer.history, # type: ignore
316
311
  }
317
312
 
318
313
  if hasattr(self.trainer, 'scheduler') and self.trainer.scheduler is not None: # type: ignore
319
314
  checkpoint_data[PyTorchCheckpointKeys.SCHEDULER_STATE] = self.trainer.scheduler.state_dict() # type: ignore
320
315
 
321
316
  torch.save(checkpoint_data, filepath)
317
+
318
+ self._latest_checkpoint_path = filepath
322
319
 
323
320
  self.saved_checkpoints.append(filepath)
324
321
 
@@ -330,8 +327,16 @@ class ModelCheckpoint(Callback):
330
327
  _LOGGER.info(f" -> Deleting old checkpoint: {file_to_delete.name}")
331
328
  file_to_delete.unlink()
332
329
 
330
+ @property
331
+ def best_checkpoint_path(self):
332
+ if self._latest_checkpoint_path:
333
+ return self._latest_checkpoint_path
334
+ else:
335
+ _LOGGER.error("No checkpoint paths saved.")
336
+ raise ValueError()
337
+
333
338
 
334
- class LRScheduler(Callback):
339
+ class DragonLRScheduler(_Callback):
335
340
  """
336
341
  Callback to manage a PyTorch learning rate scheduler.
337
342
  """
@@ -361,6 +366,8 @@ class LRScheduler(Callback):
361
366
 
362
367
  def on_epoch_end(self, epoch, logs=None):
363
368
  """Step the scheduler and log any change in learning rate."""
369
+ logs = logs or {}
370
+
364
371
  # For schedulers that need a metric (e.g., val_loss)
365
372
  if isinstance(self.scheduler, torch.optim.lr_scheduler.ReduceLROnPlateau):
366
373
  if self.monitor is None:
@@ -376,12 +383,22 @@ class LRScheduler(Callback):
376
383
  # For all other schedulers
377
384
  else:
378
385
  self.scheduler.step()
386
+
387
+ # Get the current learning rate
388
+ current_lr = self.trainer.optimizer.param_groups[0]['lr'] # type: ignore
379
389
 
380
390
  # Log the change if the LR was updated
381
- current_lr = self.trainer.optimizer.param_groups[0]['lr'] # type: ignore
382
391
  if current_lr != self.previous_lr:
383
392
  _LOGGER.info(f"Epoch {epoch}: Learning rate changed to {current_lr:.6f}")
384
393
  self.previous_lr = current_lr
394
+
395
+ # --- Add LR to logs and history ---
396
+ # Add to the logs dict for any subsequent callbacks
397
+ logs[PyTorchLogKeys.LEARNING_RATE] = current_lr
398
+
399
+ # Also add directly to the trainer's history dict
400
+ if hasattr(self.trainer, 'history'):
401
+ self.trainer.history.setdefault(PyTorchLogKeys.LEARNING_RATE, []).append(current_lr) # type: ignore
385
402
 
386
403
 
387
404
  def info():
@@ -1,16 +1,20 @@
1
- from typing import Optional
1
+ from typing import Optional, Union
2
2
  from ._script_info import _script_info
3
3
 
4
4
 
5
5
  __all__ = [
6
6
  "ClassificationMetricsFormat",
7
- "MultiClassificationMetricsFormat"
7
+ "MultiClassificationMetricsFormat",
8
+ "RegressionMetricsFormat",
9
+ "SegmentationMetricsFormat",
10
+ "SequenceValueMetricsFormat",
11
+ "SequenceSequenceMetricsFormat"
8
12
  ]
9
13
 
10
14
 
11
15
  class ClassificationMetricsFormat:
12
16
  """
13
- Optional configuration for classification tasks, use in the '.evaluate()' method of the MLTrainer.
17
+ Optional configuration for classification tasks.
14
18
  """
15
19
  def __init__(self,
16
20
  cmap: str="Blues",
@@ -65,10 +69,9 @@ class ClassificationMetricsFormat:
65
69
 
66
70
  class MultiClassificationMetricsFormat:
67
71
  """
68
- Optional configuration for multi-label classification tasks, use in the '.evaluate()' method of the MLTrainer.
72
+ Optional configuration for multi-label classification tasks.
69
73
  """
70
74
  def __init__(self,
71
- threshold: float=0.5,
72
75
  ROC_PR_line: str='darkorange',
73
76
  cmap: str = "Blues",
74
77
  font_size: int = 16) -> None:
@@ -76,10 +79,6 @@ class MultiClassificationMetricsFormat:
76
79
  Initializes the formatting configuration for multi-label classification metrics.
77
80
 
78
81
  Args:
79
- threshold (float): The probability threshold (0.0 to 1.0) used
80
- to convert sigmoid outputs into binary (0 or 1) predictions for
81
- calculating the confusion matrix and overall metrics. Defaults to 0.5.
82
-
83
82
  ROC_PR_line (str): The color name or hex code for the line plotted
84
83
  on the ROC and Precision-Recall curves (one for each label).
85
84
  Defaults to 'darkorange'.
@@ -97,14 +96,12 @@ class MultiClassificationMetricsFormat:
97
96
 
98
97
  ## [Matplotlib Colormaps](https://matplotlib.org/stable/users/explain/colors/colormaps.html)
99
98
  """
100
- self.threshold = threshold
101
99
  self.cmap = cmap
102
100
  self.ROC_PR_line = ROC_PR_line
103
101
  self.font_size = font_size
104
102
 
105
103
  def __repr__(self) -> str:
106
104
  parts = [
107
- f"threshold={self.threshold}",
108
105
  f"ROC_PR_line='{self.ROC_PR_line}'",
109
106
  f"cmap='{self.cmap}'",
110
107
  f"font_size={self.font_size}"
@@ -112,5 +109,201 @@ class MultiClassificationMetricsFormat:
112
109
  return f"MultiClassificationMetricsFormat({', '.join(parts)})"
113
110
 
114
111
 
112
+ class RegressionMetricsFormat:
113
+ """
114
+ Optional configuration for single-target regression and multi-target regression tasks.
115
+ """
116
+ def __init__(self,
117
+ font_size: int=16,
118
+ scatter_color: str='tab:blue',
119
+ scatter_alpha: float=0.6,
120
+ ideal_line_color: str='k',
121
+ residual_line_color: str='red',
122
+ hist_bins: Union[int, str] = 'auto') -> None:
123
+ """
124
+ Initializes the formatting configuration for regression metrics.
125
+
126
+ Args:
127
+ font_size (int): The base font size to apply to the plots. Defaults to 16.
128
+ scatter_color (str): Matplotlib color for the scatter plot points. Defaults to 'tab:blue'.
129
+ - Common color names: 'tab:blue', 'crimson', 'forestgreen', '#4682B4'
130
+ scatter_alpha (float): Alpha transparency for scatter plot points. Defaults to 0.6.
131
+ ideal_line_color (str): Matplotlib color for the 'ideal' y=x line in the
132
+ True vs. Predicted plot. Defaults to 'k' (black).
133
+ - Common color names: 'k', 'red', 'darkgrey', '#FF6347'
134
+ residual_line_color (str): Matplotlib color for the y=0 line in the
135
+ Residual plot. Defaults to 'red'.
136
+ - Common color names: 'red', 'blue', 'k', '#4682B4'
137
+ hist_bins (int | str): The number of bins for the residuals histogram.
138
+ Defaults to 'auto' to use seaborn's automatic bin selection.
139
+ - Options: 'auto', 'sqrt', 10, 20
140
+
141
+ <br>
142
+
143
+ ## [Matplotlib Colors](https://matplotlib.org/stable/users/explain/colors/colors.html)
144
+ """
145
+ self.font_size = font_size
146
+ self.scatter_color = scatter_color
147
+ self.scatter_alpha = scatter_alpha
148
+ self.ideal_line_color = ideal_line_color
149
+ self.residual_line_color = residual_line_color
150
+ self.hist_bins = hist_bins
151
+
152
+ def __repr__(self) -> str:
153
+ parts = [
154
+ f"font_size={self.font_size}",
155
+ f"scatter_color='{self.scatter_color}'",
156
+ f"scatter_alpha={self.scatter_alpha}",
157
+ f"ideal_line_color='{self.ideal_line_color}'",
158
+ f"residual_line_color='{self.residual_line_color}'",
159
+ f"hist_bins='{self.hist_bins}'"
160
+ ]
161
+ return f"RegressionMetricsFormat({', '.join(parts)})"
162
+
163
+
164
+ class SegmentationMetricsFormat:
165
+ """
166
+ Optional configuration for segmentation tasks.
167
+ """
168
+ def __init__(self,
169
+ heatmap_cmap: str = 'viridis',
170
+ cm_cmap: str = "Blues",
171
+ font_size: int = 16) -> None:
172
+ """
173
+ Initializes the formatting configuration for segmentation metrics.
174
+
175
+ Args:
176
+ heatmap_cmap (str): The matplotlib colormap name for the per-class
177
+ metrics heatmap. Defaults to "viridis".
178
+ - Sequential options: 'viridis', 'plasma', 'inferno', 'cividis'
179
+ - Diverging options: 'coolwarm', 'bwr', 'seismic'
180
+ cm_cmap (str): The matplotlib colormap name for the pixel-level
181
+ confusion matrix. Defaults to "Blues".
182
+ - Sequential options: 'Blues', 'Greens', 'Reds', 'Oranges'
183
+ font_size (int): The base font size to apply to the plots. Defaults to 16.
184
+
185
+ <br>
186
+
187
+ ## [Matplotlib Colormaps](https://matplotlib.org/stable/users/explain/colors/colormaps.html)
188
+ """
189
+ self.heatmap_cmap = heatmap_cmap
190
+ self.cm_cmap = cm_cmap
191
+ self.font_size = font_size
192
+
193
+ def __repr__(self) -> str:
194
+ parts = [
195
+ f"heatmap_cmap='{self.heatmap_cmap}'",
196
+ f"cm_cmap='{self.cm_cmap}'",
197
+ f"font_size={self.font_size}"
198
+ ]
199
+ return f"SegmentationMetricsFormat({', '.join(parts)})"
200
+
201
+
202
+ # Similar to regression configuration
203
+ class SequenceValueMetricsFormat:
204
+ """
205
+ Optional configuration for sequence to value prediction tasks.
206
+ """
207
+ def __init__(self,
208
+ font_size: int=16,
209
+ scatter_color: str='tab:blue',
210
+ scatter_alpha: float=0.6,
211
+ ideal_line_color: str='k',
212
+ residual_line_color: str='red',
213
+ hist_bins: Union[int, str] = 'auto') -> None:
214
+ """
215
+ Initializes the formatting configuration for sequence to value metrics.
216
+
217
+ Args:
218
+ font_size (int): The base font size to apply to the plots. Defaults to 16.
219
+ scatter_color (str): Matplotlib color for the scatter plot points. Defaults to 'tab:blue'.
220
+ - Common color names: 'tab:blue', 'crimson', 'forestgreen', '#4682B4'
221
+ scatter_alpha (float): Alpha transparency for scatter plot points. Defaults to 0.6.
222
+ ideal_line_color (str): Matplotlib color for the 'ideal' y=x line in the
223
+ True vs. Predicted plot. Defaults to 'k' (black).
224
+ - Common color names: 'k', 'red', 'darkgrey', '#FF6347'
225
+ residual_line_color (str): Matplotlib color for the y=0 line in the
226
+ Residual plot. Defaults to 'red'.
227
+ - Common color names: 'red', 'blue', 'k', '#4682B4'
228
+ hist_bins (int | str): The number of bins for the residuals histogram.
229
+ Defaults to 'auto' to use seaborn's automatic bin selection.
230
+ - Options: 'auto', 'sqrt', 10, 20
231
+
232
+ <br>
233
+
234
+ ## [Matplotlib Colors](https://matplotlib.org/stable/users/explain/colors/colors.html)
235
+ """
236
+ self.font_size = font_size
237
+ self.scatter_color = scatter_color
238
+ self.scatter_alpha = scatter_alpha
239
+ self.ideal_line_color = ideal_line_color
240
+ self.residual_line_color = residual_line_color
241
+ self.hist_bins = hist_bins
242
+
243
+ def __repr__(self) -> str:
244
+ parts = [
245
+ f"font_size={self.font_size}",
246
+ f"scatter_color='{self.scatter_color}'",
247
+ f"scatter_alpha={self.scatter_alpha}",
248
+ f"ideal_line_color='{self.ideal_line_color}'",
249
+ f"residual_line_color='{self.residual_line_color}'",
250
+ f"hist_bins='{self.hist_bins}'"
251
+ ]
252
+ return f"SequenceValueMetricsFormat({', '.join(parts)})"
253
+
254
+
255
+ class SequenceSequenceMetricsFormat:
256
+ """
257
+ Optional configuration for sequence-to-sequence evaluation plots.
258
+ """
259
+ def __init__(self,
260
+ font_size: int = 16,
261
+ plot_figsize: tuple[int, int] = (10, 6),
262
+ grid_style: str = '--',
263
+ rmse_color: str = 'tab:blue',
264
+ rmse_marker: str = 'o-',
265
+ mae_color: str = 'tab:orange',
266
+ mae_marker: str = 's--'):
267
+ """
268
+ Initializes the formatting configuration for seq-to-seq metrics.
269
+
270
+ Args:
271
+ font_size (int): The base font size to apply to the plots. Defaults to 16.
272
+ plot_figsize (Tuple[int, int]): Figure size for the plot. Defaults to (10, 6).
273
+ grid_style (str): Matplotlib linestyle for the plot grid. Defaults to '--'.
274
+ - Options: '--' (dashed), ':' (dotted), '-.' (dash-dot), '-' (solid)
275
+ rmse_color (str): Matplotlib color for the RMSE line. Defaults to 'tab:blue'.
276
+ - Common color names: 'tab:blue', 'crimson', 'forestgreen', '#4682B4'
277
+ rmse_marker (str): Matplotlib marker style for the RMSE line. Defaults to 'o-'.
278
+ - Options: 'o-' (circle), 's--' (square), '^:' (triangle), 'x' (x marker)
279
+ mae_color (str): Matplotlib color for the MAE line. Defaults to 'tab:orange'.
280
+ - Common color names: 'tab:orange', 'purple', 'black', '#FF6347'
281
+ mae_marker (str): Matplotlib marker style for the MAE line. Defaults to 's--'.
282
+ - Options: 's--', 'o-', 'v:', '+' (plus marker)
283
+
284
+ <br>
285
+
286
+ ## [Matplotlib Colors](https://matplotlib.org/stable/users/explain/colors/colors.html)
287
+ ## [Matplotlib Linestyles](https://matplotlib.org/stable/gallery/lines_bars_and_markers/linestyles.html)
288
+ ## [Matplotlib Markers](https://matplotlib.org/stable/api/markers_api.html)
289
+ """
290
+ self.font_size = font_size
291
+ self.plot_figsize = plot_figsize
292
+ self.grid_style = grid_style
293
+ self.rmse_color = rmse_color
294
+ self.rmse_marker = rmse_marker
295
+ self.mae_color = mae_color
296
+ self.mae_marker = mae_marker
297
+
298
+ def __repr__(self) -> str:
299
+ parts = [
300
+ f"font_size={self.font_size}",
301
+ f"plot_figsize={self.plot_figsize}",
302
+ f"grid_style='{self.grid_style}'",
303
+ f"rmse_color='{self.rmse_color}'",
304
+ f"mae_color='{self.mae_color}'"
305
+ ]
306
+ return f"SequenceMetricsFormat({', '.join(parts)})"
307
+
115
308
  def info():
116
309
  _script_info(__all__)