TypeError: only integer arrays with one element can be converted to an index

I finally got to solve the problem. Two things had to be done:

  1. train_argcands_target is a list and it has to be a numpy array. I’m surprised it worked well before when I just used the estimator directly.
  2. For some reason (I don’t know why, yet), it doesn’t work either if I use the sparse matrix created by the DictVectorizer. I had to, “manually”, transform each feature dictionary to a feature array with just integers representing each feature value. The transformation process is similar to the one I present in the code for the target values.

Thanks to everyone who tried to help!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)