0

I'm working on a text classification problem, I'd like to know exacly for which input I got wrong prediction at validation. Is there a way to do that in Keras? I imagine something like a column bar graph for bad predictions. (X sentence length, Y quantity/occurrence)

I've found this article about visalisation but it's kinda different what I need. I'm making very few epochs so this method is not showing any information for me.

I'm aware that I can save the history of the training but as far as I know

thank you for reading my post.

EDIT:

My current dataframe looks like this:

+----------------+----------+
|    sentence    | language |
+----------------+----------+
| test sentence. | english  |
+----------------+----------+

And after validaiton I'd like to get something like this as pythonic833 suggested:

+----------------+----------+-----------+
|    sentence    | language | validated |
+----------------+----------+-----------+
| test sentence. | english  | english   |
+----------------+----------+-----------+

Can I achive this during training (I have seperate validation dataset) or should I just use model.predict and construct it by myself?

LagSurfer
  • 387
  • 4
  • 19
  • I can just give you some general thoughts about this: construct a dataframe df with the following form: X,Y_true,Y_pred. Then you can construct a dataframe df_wrong_class = df[df[Y_true] != df[Y_pred]] and analyze this. For that you can use groupby or any of the pandas visualization tools. Is that what you're looking for? – pythonic833 Mar 27 '18 at 09:44
  • Yes I'd like to use pandas to later on but I'm not quite sure how to get the valdiated values to a dataframe. – LagSurfer Mar 27 '18 at 12:03

0 Answers0