aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/sca/re/tree.py
diff options
context:
space:
mode:
authorJ08nY2025-03-19 15:07:06 +0100
committerJ08nY2025-03-19 15:07:06 +0100
commitb3d4e400a81950a87aa866726f9d2d5d97a1f92e (patch)
tree8bb0bdac65affa6b6b757f48a47f02f9cfd72ffe /pyecsca/sca/re/tree.py
parentf50335f62ff4ebd4ea855597357f1d7a6df8eef8 (diff)
downloadpyecsca-b3d4e400a81950a87aa866726f9d2d5d97a1f92e.tar.gz
pyecsca-b3d4e400a81950a87aa866726f9d2d5d97a1f92e.tar.zst
pyecsca-b3d4e400a81950a87aa866726f9d2d5d97a1f92e.zip
Diffstat (limited to 'pyecsca/sca/re/tree.py')
-rw-r--r--pyecsca/sca/re/tree.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pyecsca/sca/re/tree.py b/pyecsca/sca/re/tree.py
index 6307c0f..15664ac 100644
--- a/pyecsca/sca/re/tree.py
+++ b/pyecsca/sca/re/tree.py
@@ -361,12 +361,20 @@ class SplitCriterion:
"""
def __call__(self, split: pd.Series) -> float:
+ """
+ Compute the score of a split.
+
+ :param split: The split to score.
+ :return: The score, can be any (consistent) scale.
+ """
raise NotImplementedError
def is_better(self, score: float, current_best: float) -> bool:
+ """Whether the score is better than the current best."""
raise NotImplementedError
def is_optimal(self, score: float, n_cfgs: int, n_codomain: int) -> bool:
+ """Whether the score is optimal and no further splits need to be examined."""
raise NotImplementedError