On the DIF (Deep Isolation Forest) model, in the fit function, the variable X is normalized. Then it is passed to decision_function to compute the decision_scores_, where it is normalized again. This results in a mismatch between decision_scores_ and scores obtained by calling decision_function(X) on the same X.
On the DIF (Deep Isolation Forest) model, in the
fit
function, the variableX
is normalized. Then it is passed todecision_function
to compute thedecision_scores_
, where it is normalized again. This results in a mismatch betweendecision_scores_
and scores obtained by callingdecision_function(X)
on the sameX
.Normalization: https://github.com/yzhao062/pyod/blob/690a0f25987fab0664b014bbc7121d999c92f5f6/pyod/models/dif.py#L173-L175
decision_function
call: https://github.com/yzhao062/pyod/blob/690a0f25987fab0664b014bbc7121d999c92f5f6/pyod/models/dif.py#L215-L216Normalization in
decision_function
: https://github.com/yzhao062/pyod/blob/690a0f25987fab0664b014bbc7121d999c92f5f6/pyod/models/dif.py#L241