Created
August 30, 2022 19:47
-
-
Save joshreini1/e876655e217856a55077542b430c99f9 to your computer and use it in GitHub Desktop.
instantiate xgboost regression for airbnb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#instantiate model | |
xgb_reg = xgb.XGBRegressor() | |
# combine both preprocessing and modeling | |
xgb_pipe = Pipeline([ | |
('preprocess', comprehensive_preprocessing), | |
('xgboost', xgb_reg) | |
]) | |
#fit pipe | |
xgb_pipe.fit(X_train,y_train) | |
#add model to truera | |
tru.add_python_model("xgb_pipe", xgb_pipe, pipeline_feature_map = feature_map_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment