yzhao062 / pyod

A Python Library for Outlier and Anomaly Detection, Integrating Classical and Deep Learning Techniques
http://pyod.readthedocs.io
BSD 2-Clause "Simplified" License
8.58k stars 1.37k forks source link

SOS: overflow encountered in multiply beta[i] = beta[i] * 2.0 #83

Open panchami96 opened 5 years ago

panchami96 commented 5 years ago

I am running the following code:

clf_name = 'SOS'

clf_name = 'SOS' clf = SOS() clf.fit(X_train)

and got the following warning: RuntimeWarning: overflow encountered in multiply beta[i] = beta[i] 2.0 /opt/anaconda3/lib/python3.6/site-packages/scipy/stats/stats.py:1713: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result. return np.add.reduce(sorted[indexer] weights, axis=axis) / sumval ~/proj/myPylib/lib/python3.6/site-packages/pyod/models/base.py:336: RuntimeWarning: invalid value encountered in greater self.labels_ = (self.decisionscores > self.threshold_).astype(

data.zip I have uploaded the data for X_train here.

My samples have duplicates and when I remove the duplicates the error does not occur. However I need to retain the duplicates.

yzhao062 commented 5 years ago

Thanks a lot for the note. Will do some investigation. It sounds like a 0 division bug. Maybe add a small constant to duplicated entries for now?

Will update soon.

Ldoun commented 1 year ago

have the same problem too