ConfusionMatrix#
- class openstef_beam.metrics.ConfusionMatrix(true_positives: NDArray[bool], true_negatives: NDArray[bool], false_positives: NDArray[bool], false_negatives: NDArray[bool], effective_true_positives: NDArray[bool], ineffective_true_positives: NDArray[bool])[source]#
Bases:
NamedTupleConfusion matrix components for peak detection in energy forecasting.
This class represents the results of classifying energy load peaks versus non-peaks, with additional effectiveness metrics to account for the direction and magnitude of prediction errors.
- Variables:
true_positives (
NDArray[bool]) – Boolean array indicating correctly predicted peaks.true_negatives (
NDArray[bool]) – Boolean array indicating correctly predicted non-peaks.false_positives (
NDArray[bool]) – Boolean array indicating incorrectly predicted peaks.false_negatives (
NDArray[bool]) – Boolean array indicating missed peaks.effective_true_positives (
NDArray[bool]) – Boolean array indicating true positives that are effective (peak correctly predicted with appropriate magnitude/direction).ineffective_true_positives (
NDArray[bool]) – Boolean array indicating true positives that are ineffective (peak correctly predicted but with wrong magnitude/direction).
Note
All arrays have shape (num_samples,) and correspond to the same time points in the original forecast evaluation.
- Parameters: