Issam,

currently, GaussianNB does not support sample weights thus it cannot
be used w/ Adaboost.
In Weka, if a classifier does not support sample weights they fall
back to data set re-sampling. We could implement this strategy as well
but it would not be very efficient due to the data structures that we
use internally (i.e. numpy arrays).

best,
 Peter

2013/3/7 Issam <issamo...@gmail.com>:
> Evening Dear Developers!
>
> I'm peculiarly getting an error while using AdaBoostClassifier with
> GaussianNB() as a a base estimator.
>
> These are my commands
>
> In [65]: gnb = GaussianNB()
> In [66]: bdt = AdaBoostClassifier(gnb,n_estimators=100)
> In [67]: bdt.fit(X,y)
>
> I get the following error after executing "In[67]" :
>
> TypeError: fit() got an unexpected keyword argument 'sample_weight'
>
> Any reason why I might be getting this?
>
> PS: I frequently use adaboosting with Navie Bayes as a base classifier in
> WEKA, hence the concern :)
>
> Thank you very much!
>
> Best regards,
> --Issam Laradji
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
> endpoint security space. For insight on selecting the right partner to
> tackle endpoint security challenges, access the full report.
> http://p.sf.net/sfu/symantec-dev2dev
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>



-- 
Peter Prettenhofer

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to