pyod
pyod copied to clipboard
AutoEncoder gives following Error: "AttributeError: 'NoneType' object has no attribute 'copy'"
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)
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.