ValueError: setting an array element with a sequence. while using SVM in scikit-learn

前端 未结 3 2014
無奈伤痛
無奈伤痛 2020-12-03 07:09

I have been working on scikit-learn SVMs for a binary classification problem. I have calculated the features of audio files and wrote them into a CSV file. This is how each

3条回答
  •  醉酒成梦
    2020-12-03 07:46

    Finally I found the answer to my question with the help of some ideas from @larsmans and @eickenberg. The problem was that X_train did not have the same number of elements in all the arrays. So, it was not able to form a 2D array. Now that I have added an additional value to that array, the dimensionality matched for all the 1D arrays and X_train was able to form a 2D array. Thanks for the ideas guys!

提交回复
热议问题