Last active
December 7, 2022 15:54
-
-
Save liannewriting/8a977a483aecfe94c030414f6b7b25ce to your computer and use it in GitHub Desktop.
xgboost python machine learning
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
from sklearn.pipeline import Pipeline | |
from category_encoders.target_encoder import TargetEncoder | |
from xgboost import XGBClassifier | |
estimators = [ | |
('encoder', TargetEncoder()), | |
('clf', XGBClassifier(random_state=8)) # can customize objective function with the objective parameter | |
] | |
pipe = Pipeline(estimators) | |
pipe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment