Thanks Luca, I tried your suggestion but I am still getting that error. It 
seems that the problem is causing because of boolean mask operations done on 
numpy array inside precision_recall_fscore_support function() - ref[1]. Still 
not sure though. 
[1] 
http://stackoverflow.com/questions/26778500/valueerror-too-many-boolean-indices-for-a-n-600-array-float
 


From: lucapug...@gmail.com
Date: Mon, 13 Apr 2015 16:04:51 +0000
To: scikit-learn-general@lists.sourceforge.net
Subject: Re: [Scikit-learn-general] Help: Getting ValueError    
@precision_recall_fscore_support

I do not know if this is related to your problem but you should avoid mutable 
default argument. Try to replace labels with a tuple.  Or assign its default 
value inside the function. 

On Mon, Apr 13, 2015, 17:30 namma igloo <nammaig...@outlook.com> 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               
                          
------------------------------------------------------------------------------
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