Enable App Domain Assessment on Model Page (#45)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#45
This commit is contained in:
2025-08-12 09:02:11 +12:00
parent ec52b8872d
commit 1267ca8ace
5 changed files with 264 additions and 18 deletions

View File

@ -109,6 +109,16 @@ class Dataset:
raise ValueError(f"Header and Data are not aligned {len(self.columns)} vs. {len(row)}")
self.data.append(row)
def times_triggered(self, rule_uuid) -> int:
idx = self.columns.index(f'trig_{rule_uuid}')
times_triggered = 0
for row in self.data:
if row[idx] == 1:
times_triggered += 1
return times_triggered
def struct_features(self) -> Tuple[int, int]:
return self._struct_features