yzhao062 / pyod

A Comprehensive and Scalable Python Library for Outlier Detection (Anomaly Detection)

Home Page:http://pyod.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The number of non-zero elements in projection vector for LODA

tam17aki opened this issue · comments

In the current implementation of LODA, the number of non-zero elements in projection vector is specified as

n_nonzero_components = np.sqrt(n_components)

where n_components is the dimensionarity of the feature vector.

cf., https://github.com/yzhao062/pyod/blob/master/pyod/models/loda.py#L94

However, from the original peper of LODA, we can see that projection vectors with $d^{-1/2}$ non-zero components are required, where $d$ is the dimensionarity of the feature vector.

Therefore, I think it should be fixed as np.sqrt(-n_components), though I'm not sure.

Best regards,
Akira.