pyod icon indicating copy to clipboard operation
pyod copied to clipboard

AutoEncoder gives following Error: "AttributeError: 'NoneType' object has no attribute 'copy'"

Open 2much2code opened this issue 3 years ago • 1 comments

Hello,

I tried to use the AutoEncoder for unsupervised anomaly detection but I get the error as in the title. I am not sure what I did wrong, when I tried the AutoEncoder with synthetic generated data it worked fine but when I try to fit it with the actual data I need to find anomalies in it is not working. I am not sure what could possible have went wrong. The code is not much, I imported the AutoEncoder and used the .fit() method:

stock = pd.read_csv("ohe_stock.csv") s_clf = AutoEncoder(hidden_neurons=[150,100,50]) s_clf.fit(stock)

2much2code avatar Mar 01 '22 16:03 2much2code

Without having a minimal example to reproduce, these errors are always hard to debug.

My suggestions is that this might have something to do with s_clf.fit(stock) and stock being a pandas dataframe. The fit functions expects a numpy array. Both are similar but this might cause the problem.

Lucew avatar Aug 31 '22 21:08 Lucew