mattiacarletti / DIFFI

Official repository of the paper "Interpretable Anomaly Detection with DIFFI: Depth-based Isolation Forest Feature Importance", M. Carletti, M. Terzi, G. A. Susto.
https://arxiv.org/abs/2007.11117
MIT License
27 stars 9 forks source link

bug report in interpretability_module.py #2

Open ForeverYoung666 opened 1 year ago

ForeverYoung666 commented 1 year ago

in interpretability_module.py line 98: max_depth = int(np.ceil(np.log2(iforest.max_samples))) there is a bug here: if you train iforest model with parameters: max_samples = 1.0,iforest.max_samples will be 1.0 and the "max_depth" here will be 0. actually you want iforest.max_samples to be the number of training samples

rcrupi commented 1 year ago

Could the solution be substitute "iforest.max_samples" with "iforest.maxsamples"?

ForeverYoung666 commented 1 year ago

yes, I think so, after referring to the doc of sklearn

发自我的iPhone

------------------ Original ------------------ From: rcrupi @.> Date: Mon,Apr 3,2023 5:36 PM To: mattiacarletti/DIFFI @.> Cc: ForeverYoung666 @.>, Author @.> Subject: Re: [mattiacarletti/DIFFI] bug report in interpretability_module.py(Issue #2)

Could the solution be substitute "iforest.max_samples" with "iforest.maxsamples"?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>