AttributeAnomaly | apply_to_case
Hi there,
There seems to be an issue in 3.A3 BPIC Datasets, in particular with line 338 in the anomaly.py. Sometimes self.attributes is an empty list, so randint will throw an Exception low >= high.
For me the fix is to change in 3.A3 BPIC Datasets: "if event_log.num_event_attributes > 0:" to "if event_log.num_event_attributes > 1:"
Cause it seems like the problem appears when the event_log.event_attribute_keys is ['name'] as the len is 1 but after that it will not be counted in anomaly.attributes and generates the empty list.
Unfortunately I am just starting to look into the code and have no idea if my fix is appropriate, but I hope it helps.
You are right. It seems I have later included the name attribute in the event_attributes. Your fix is therefore correct. Thanks for reporting!