model_lgb.fit(train, y_train) # Fitting the train values on the model lgb_train_pred = model_lgb.predict(train) # Train predictions lgb_pred=model_lgb.predict_proba(test) # Predicting on test set and storing them lgb_model = "lgb.pkl" with open(lgb_model, 'wb') as file: # Saving the weights file pickle.dump(model_lgb, file) GBoost.fit(train, y_train) # Fitting the train values on the model GBoost_train_pred = GBoost.predict(train) # Train predictions GBoost_pred = GBoost.predict_proba(test.values) # Predicting on test set and storing them Gboost_model= "Gboost.pkl" with open(Gboost_model, 'wb') as file: # Saving the weights file pickle.dump(GBoost, file) rf_random.best_estimator_.fit(train, y_train) # Fitting the train values on the model rf_random.best_estimator_train_pred = rf_random.best_estimator_.predict(train) # Train predictions rf_random.best_estimator_pred = rf_random.best_estimator_.predict_proba(test.values) # Predicting on test set and storing them rf_model= "rf.pkl" with open(rf_model, 'wb') as file: # Saving the weights file pickle.dump(rf_random.best_estimator_, file) """## Loading Weights""" Gboost= "./Gboost.pkl" # Loading weights from weights file with open(Gboost, 'rb') as file: Gboost_model = pickle.load(file) GBoost_pred = Gboost_model.predict_proba(test.values) # Finding the prediction probabilities for test values lgb= "./lgb.pkl" # Loading weights from weights file with open(lgb, 'rb') as file: