I think this is because your y_true_combined has five classes, while your labels and target names only have four classes.

On 04/13/2015 11:29 AM, namma igloo wrote:
Hi,

I'm new to sklearn and trying out python-crfsuit example [1] on my own data and following the example code, I'm getting - @precision_recall_fscore_support method: ValueError: too many boolean indices

I must note that this method is called by [classification_report] function which I'm calling with following signature:

classification_report(
        y_true_combined,
        y_pred_combined,
        labels = [class_indices[cls] for cls in tagset],
        target_names = tagset
 )

I do not get any error if I omit the optional parameters 'labels' and 'target_names'. So I am not sure if the issue is because of values of those two parameters or somewhere else.

I have pasted here [2] the values of all four variables supplied to classification_report.
I'll appreciate in any help in troubleshooting this issue.

[1] http://nbviewer.ipython.org/github/tpeng/python-crfsuite/blob/master/examples/CoNLL%202002.ipynb
[2] http://pastebin.com/qaq7Kf1u

Thanks


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF


_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to