Imported from https://github.com/StephenPauwels/edbn_ecmlpkdd