Assuming I fit the following neural network for a binary classification problem:
model = Sequential()
model.add(Dense(21, input_dim=19, init=\'uniform\', activat
Keras itself does not implement adaboost. However, Keras models are compatible with scikit-learn, so you probably can use AdaBoostClassifier
from there: link. Use your model
as the base_estimator
after you compile it, and fit
the AdaBoostClassifier
instance instead of model
.
This way, however, you will not be able to use the arguments you pass to fit
, such as number of epochs or batch_size, so the defaults will be used. If the defaults are not good enough, you might need to build your own class that implements the scikit-learn interface on top of your model and passes proper arguments to fit
.