I have my own classifier which is written in python. I want to use that classifier with adaboostclassifier method. One example which has been provided online is in the link.
The key code line is as follows
clf_2 = AdaBoostRegressor(DecisionTreeRegressor(max_depth=4),
n_estimators=300, random_state=rng)
It combines the DecisionTreeRegressor with the boosting.
I am wondering that how could we give the custom made classification method.
Which methods are required to be implemented, data formats etc.
Is there any code which could be followed online? Any code sample which could demonstrate, plugging in your custom classifier.
The roll-your-own estimator section in the docs explains how to implement your own estimator. In addition to this, you need to implement the sample_weight
argument to fit
because AdaBoost requires a way of reweighting samples.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With