marcotcr / lime

Lime: Explaining the predictions of any machine learning classifier
BSD 2-Clause "Simplified" License
11.41k stars 1.79k forks source link

[Multiclass Thai Text Classification] IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed #685

Open setthawut8 opened 1 year ago

setthawut8 commented 1 year ago

"IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed"

the current model is BayesSearchCV as a below image Screenshot 2022-07-27 152031

an example of the prediction based as a below image Screenshot 2022-07-27 150626

and codes for the lime as a below image. Screenshot 2022-07-27 150927

My question is how to turn above prediction (or output) to be 2D output as you did or can I have your addressed codes.

Thank you for your helps.

20032303092 commented 1 year ago

I have the same problem, do you solve it?