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.42k stars 1.36k forks source link

Autoencoder is giving segmentation fault. #368

Open wizard1359 opened 2 years ago

wizard1359 commented 2 years ago

I am trying to use autoencoder for anomaly detection, my dataset consists of 200 rows and 40 columns, whenever I am trying to fit the encoder I am getting the segmentation fault, core dumped error, I tried different batch sizes as well like 4,8,12,16 but the error is persisting.The same error is happening with some other models like abod, cblof etc. please suggest me regarding this.

yzhao062 commented 2 years ago

Please share the screenshot...I am afraid that this is not about PyOD as it is the first time we heard this. If abod, knn, and other non deep learning models throw this error, it is likely something wrong with your python env.

wizard1359 commented 2 years ago

Thanks for the response,I cannot share the screenshot due to some restrictions, please accept my apologies.

The code I used for AutoEncoder is:

from pyod.models.auto_encoder import AutoEncoder
clf=AutoEncoder(batch_size=8,epochs=10,contamination=0.05,random_state=42)
clf.fit(data)

The code I used for ABOD is:

from pyod.models.abod import ABOD
clf=ABOD(contamination=0.05)
clf.fit(data)

In both cases,when I tried to run the clf.fit(data),Notebook is getting restarted and when I run the .py file in terminal I am getting the error Segmentation fault, core dumped.

The following are versions of the libraries I am using: pyod version-0.9.7 Numpy version-1.16.5 Tensorflow version-2.7.0 Keras version -2.7.0

However I am not facing any issues in other algorithms like mo_gaal, ocsvm etc.

please let me know if any further details are required from my side.