Skip to content
Advertisement

ValueError: ‘c’ argument has 1000 elements, which is inconsistent with ‘x’ and ‘y’ with size 500

I’m in my way of studing anomaly detection for speech data. My original code written with LSTM, but I’m in faced to imbalance dataset. So I’m trying to have some insights from Pyod.
On trying from Pyod sampling data, I just copied and pasted their code to my colab, but I encounter error as “ValueError: ‘c’ argument has 1000 elements, which is inconsistent with ‘x’ and ‘y’ with size 500.”

JavaScript

Advertisement

Answer

it seems that c=y_train is the source of error. c option is for color: you might need to “translate” your y_train into some form of color format. Just to make the program running syntactically correct (but may not what you want), change to:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement