import joblib joblib.dump(bagging, 'model.pkl')