0
classifier = AdaBoostClassifier(n_estimators=100, learning_rate=1.0, algorithm='SAMME.R')
try:
    classifier = joblib.load("final_model_Ada1.pkl")
    print "using trained model"
except:
    print "building new model"
    classifier.fit(X_train, y_train)
    joblib.dump(classifier, 'final_model_Ada1.pkl')

I wrote the above script for training an AdaBoostClassifier on some data.The pkl file is being formed the first time.But when I run the script again the model is being trained again and the previous model is not being picked up.I did the same thing for Linear SVC and that is working.Is there any other way to save an AdaBoostClassifier?

akshita007
  • 549
  • 1
  • 9
  • 15

0 Answers0