Skip to content

'sample_weight' error using Adaboost Classifier with logistic regression and Naive Bayes #1752

@IssamLaradji

Description

@IssamLaradji

I'm peculiarly getting an error while using AdaBoostClassifier with GaussianNB() or LogisticRegression() as 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions