It is a multilabel problem. So the labels look like the following:
[1 0 0]
[0 1 0]
[0 1 1]
and so on..
On Mon, Jun 23, 2014 at 4:31 PM, Joel Nothman <joel.noth...@gmail.com>
wrote:
> Not that this error is correct behaviour, but that you might not be aware
> that there is a likely problem with your data.
>
>
> On 23 June 2014 10:30, Joel Nothman <joel.noth...@gmail.com> wrote:
>
>> It seems that there is a class label present in all training instances...
>>
>>
>> On 23 June 2014 10:20, abhishek <abhish...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> Ive been getting this very weird error when using OneVsRestClassifier.
>>>
>>>
>>> ---------------------------------------------------------------------------AttributeError
>>> Traceback (most recent call
>>> last)<ipython-input-74-0cb777403b75> in <module>()----> 1 preds_sgd =
>>> sgd.predict_proba(xtest)
>>> /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/multiclass.pyc
>>> in predict_proba(self, X) 247 """ 248 return
>>> predict_proba_ovr(self.estimators_, X,--> 249
>>> is_multilabel=self.multilabel_) 250 251 def
>>> decision_function(self, X):
>>> /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/multiclass.pyc
>>> in predict_proba_ovr(estimators, X, is_multilabel) 110 # Y[i,j]
>>> gives the probability that sample i has the label j. 111 # In the
>>> multi-label case, these are not disjoint.--> 112 Y =
>>> np.array([est.predict_proba(X)[:, 1] for est in estimators]).T 113
>>> 114 if not is_multilabel:
>>> AttributeError: '_ConstantPredictor' object has no attribute 'predict_proba'
>>>
>>>
>>> Im using naive_bayes.BernoulliNB() as BaseEstimator and using the 0.15-git
>>> version of scikit-learn.
>>>
>>>
>>> --
>>> Regards
>>>
>>> Abhishek Thakur
>>>
>>> - de.linkedin.com/in/abhisvnit/
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
>>> Find What Matters Most in Your Big Data with HPCC Systems
>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>>> http://p.sf.net/sfu/hpccsystems
>>> _______________________________________________
>>> Scikit-learn-general mailing list
>>> Scikit-learn-general@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>>
>>>
>>
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
--
Regards
Abhishek Thakur
- de.linkedin.com/in/abhisvnit/
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general