XGBoost Python Package
This page contains links to all the python related documents on python package.To install the package, checkoutInstallation Guide.
Contents
- Python Package Introduction
- Using the Scikit-Learn Estimator Interface
- Python API Reference
- Global Configuration
- Core Data Structure
DMatrixDMatrix.data_split_mode()DMatrix.feature_namesDMatrix.feature_typesDMatrix.get_base_margin()DMatrix.get_categories()DMatrix.get_data()DMatrix.get_float_info()DMatrix.get_group()DMatrix.get_label()DMatrix.get_quantile_cut()DMatrix.get_uint_info()DMatrix.get_weight()DMatrix.num_col()DMatrix.num_nonmissing()DMatrix.num_row()DMatrix.save_binary()DMatrix.set_base_margin()DMatrix.set_float_info()DMatrix.set_float_info_npy2d()DMatrix.set_group()DMatrix.set_info()DMatrix.set_label()DMatrix.set_uint_info()DMatrix.set_weight()DMatrix.slice()
QuantileDMatrixQuantileDMatrix.data_split_mode()QuantileDMatrix.feature_namesQuantileDMatrix.feature_typesQuantileDMatrix.get_base_margin()QuantileDMatrix.get_categories()QuantileDMatrix.get_data()QuantileDMatrix.get_float_info()QuantileDMatrix.get_group()QuantileDMatrix.get_label()QuantileDMatrix.get_quantile_cut()QuantileDMatrix.get_uint_info()QuantileDMatrix.get_weight()QuantileDMatrix.num_col()QuantileDMatrix.num_nonmissing()QuantileDMatrix.num_row()QuantileDMatrix.refQuantileDMatrix.save_binary()QuantileDMatrix.set_base_margin()QuantileDMatrix.set_float_info()QuantileDMatrix.set_float_info_npy2d()QuantileDMatrix.set_group()QuantileDMatrix.set_info()QuantileDMatrix.set_label()QuantileDMatrix.set_uint_info()QuantileDMatrix.set_weight()QuantileDMatrix.slice()
ExtMemQuantileDMatrixExtMemQuantileDMatrix.data_split_mode()ExtMemQuantileDMatrix.feature_namesExtMemQuantileDMatrix.feature_typesExtMemQuantileDMatrix.get_base_margin()ExtMemQuantileDMatrix.get_categories()ExtMemQuantileDMatrix.get_data()ExtMemQuantileDMatrix.get_float_info()ExtMemQuantileDMatrix.get_group()ExtMemQuantileDMatrix.get_label()ExtMemQuantileDMatrix.get_quantile_cut()ExtMemQuantileDMatrix.get_uint_info()ExtMemQuantileDMatrix.get_weight()ExtMemQuantileDMatrix.num_col()ExtMemQuantileDMatrix.num_nonmissing()ExtMemQuantileDMatrix.num_row()ExtMemQuantileDMatrix.refExtMemQuantileDMatrix.save_binary()ExtMemQuantileDMatrix.set_base_margin()ExtMemQuantileDMatrix.set_float_info()ExtMemQuantileDMatrix.set_float_info_npy2d()ExtMemQuantileDMatrix.set_group()ExtMemQuantileDMatrix.set_info()ExtMemQuantileDMatrix.set_label()ExtMemQuantileDMatrix.set_uint_info()ExtMemQuantileDMatrix.set_weight()ExtMemQuantileDMatrix.slice()
BoosterBooster.__getitem__()Booster.attr()Booster.attributes()Booster.best_iterationBooster.best_scoreBooster.boost()Booster.copy()Booster.dump_model()Booster.eval()Booster.eval_set()Booster.feature_namesBooster.feature_typesBooster.get_categories()Booster.get_dump()Booster.get_fscore()Booster.get_score()Booster.get_split_value_histogram()Booster.inplace_predict()Booster.load_config()Booster.load_model()Booster.num_boosted_rounds()Booster.num_features()Booster.predict()Booster.reset()Booster.save_config()Booster.save_model()Booster.save_raw()Booster.set_attr()Booster.set_param()Booster.trees_to_dataframe()Booster.update()
DataIterCategories
- Learning API
- Scikit-Learn API
XGBRegressorXGBRegressor.apply()XGBRegressor.best_iterationXGBRegressor.best_scoreXGBRegressor.coef_XGBRegressor.evals_result()XGBRegressor.feature_importances_XGBRegressor.feature_names_in_XGBRegressor.fit()XGBRegressor.get_booster()XGBRegressor.get_metadata_routing()XGBRegressor.get_num_boosting_rounds()XGBRegressor.get_params()XGBRegressor.get_xgb_params()XGBRegressor.intercept_XGBRegressor.load_model()XGBRegressor.n_features_in_XGBRegressor.predict()XGBRegressor.save_model()XGBRegressor.score()XGBRegressor.set_fit_request()XGBRegressor.set_params()XGBRegressor.set_predict_request()XGBRegressor.set_score_request()
XGBClassifierXGBClassifier.apply()XGBClassifier.best_iterationXGBClassifier.best_scoreXGBClassifier.coef_XGBClassifier.evals_result()XGBClassifier.feature_importances_XGBClassifier.feature_names_in_XGBClassifier.fit()XGBClassifier.get_booster()XGBClassifier.get_metadata_routing()XGBClassifier.get_num_boosting_rounds()XGBClassifier.get_params()XGBClassifier.get_xgb_params()XGBClassifier.intercept_XGBClassifier.load_model()XGBClassifier.n_features_in_XGBClassifier.predict()XGBClassifier.predict_proba()XGBClassifier.save_model()XGBClassifier.score()XGBClassifier.set_fit_request()XGBClassifier.set_params()XGBClassifier.set_predict_proba_request()XGBClassifier.set_predict_request()XGBClassifier.set_score_request()
XGBRankerXGBRanker.apply()XGBRanker.best_iterationXGBRanker.best_scoreXGBRanker.coef_XGBRanker.evals_result()XGBRanker.feature_importances_XGBRanker.feature_names_in_XGBRanker.fit()XGBRanker.get_booster()XGBRanker.get_metadata_routing()XGBRanker.get_num_boosting_rounds()XGBRanker.get_params()XGBRanker.get_xgb_params()XGBRanker.intercept_XGBRanker.load_model()XGBRanker.n_features_in_XGBRanker.predict()XGBRanker.save_model()XGBRanker.score()XGBRanker.set_fit_request()XGBRanker.set_params()XGBRanker.set_predict_request()
XGBRFRegressorXGBRFRegressor.apply()XGBRFRegressor.best_iterationXGBRFRegressor.best_scoreXGBRFRegressor.coef_XGBRFRegressor.evals_result()XGBRFRegressor.feature_importances_XGBRFRegressor.feature_names_in_XGBRFRegressor.fit()XGBRFRegressor.get_booster()XGBRFRegressor.get_metadata_routing()XGBRFRegressor.get_num_boosting_rounds()XGBRFRegressor.get_params()XGBRFRegressor.get_xgb_params()XGBRFRegressor.intercept_XGBRFRegressor.load_model()XGBRFRegressor.n_features_in_XGBRFRegressor.predict()XGBRFRegressor.save_model()XGBRFRegressor.score()XGBRFRegressor.set_fit_request()XGBRFRegressor.set_params()XGBRFRegressor.set_predict_request()XGBRFRegressor.set_score_request()
XGBRFClassifierXGBRFClassifier.apply()XGBRFClassifier.best_iterationXGBRFClassifier.best_scoreXGBRFClassifier.coef_XGBRFClassifier.evals_result()XGBRFClassifier.feature_importances_XGBRFClassifier.feature_names_in_XGBRFClassifier.fit()XGBRFClassifier.get_booster()XGBRFClassifier.get_metadata_routing()XGBRFClassifier.get_num_boosting_rounds()XGBRFClassifier.get_params()XGBRFClassifier.get_xgb_params()XGBRFClassifier.intercept_XGBRFClassifier.load_model()XGBRFClassifier.n_features_in_XGBRFClassifier.predict()XGBRFClassifier.predict_proba()XGBRFClassifier.save_model()XGBRFClassifier.score()XGBRFClassifier.set_fit_request()XGBRFClassifier.set_params()XGBRFClassifier.set_predict_proba_request()XGBRFClassifier.set_predict_request()XGBRFClassifier.set_score_request()
- Plotting API
- Callback API
- Dask API
- PySpark API
SparkXGBClassifierSparkXGBClassifier.clear()SparkXGBClassifier.copy()SparkXGBClassifier.explainParam()SparkXGBClassifier.explainParams()SparkXGBClassifier.extractParamMap()SparkXGBClassifier.fit()SparkXGBClassifier.fitMultiple()SparkXGBClassifier.getFeaturesCol()SparkXGBClassifier.getLabelCol()SparkXGBClassifier.getOrDefault()SparkXGBClassifier.getParam()SparkXGBClassifier.getPredictionCol()SparkXGBClassifier.getProbabilityCol()SparkXGBClassifier.getRawPredictionCol()SparkXGBClassifier.getValidationIndicatorCol()SparkXGBClassifier.getWeightCol()SparkXGBClassifier.hasDefault()SparkXGBClassifier.hasParam()SparkXGBClassifier.isDefined()SparkXGBClassifier.isSet()SparkXGBClassifier.load()SparkXGBClassifier.paramsSparkXGBClassifier.read()SparkXGBClassifier.save()SparkXGBClassifier.set()SparkXGBClassifier.setParams()SparkXGBClassifier.set_coll_cfg()SparkXGBClassifier.set_device()SparkXGBClassifier.uidSparkXGBClassifier.write()
SparkXGBClassifierModelSparkXGBClassifierModel.clear()SparkXGBClassifierModel.copy()SparkXGBClassifierModel.explainParam()SparkXGBClassifierModel.explainParams()SparkXGBClassifierModel.extractParamMap()SparkXGBClassifierModel.getFeaturesCol()SparkXGBClassifierModel.getLabelCol()SparkXGBClassifierModel.getOrDefault()SparkXGBClassifierModel.getParam()SparkXGBClassifierModel.getPredictionCol()SparkXGBClassifierModel.getProbabilityCol()SparkXGBClassifierModel.getRawPredictionCol()SparkXGBClassifierModel.getValidationIndicatorCol()SparkXGBClassifierModel.getWeightCol()SparkXGBClassifierModel.get_booster()SparkXGBClassifierModel.get_feature_importances()SparkXGBClassifierModel.hasDefault()SparkXGBClassifierModel.hasParam()SparkXGBClassifierModel.isDefined()SparkXGBClassifierModel.isSet()SparkXGBClassifierModel.load()SparkXGBClassifierModel.paramsSparkXGBClassifierModel.read()SparkXGBClassifierModel.save()SparkXGBClassifierModel.set()SparkXGBClassifierModel.set_coll_cfg()SparkXGBClassifierModel.set_device()SparkXGBClassifierModel.transform()SparkXGBClassifierModel.uidSparkXGBClassifierModel.write()
SparkXGBRegressorSparkXGBRegressor.clear()SparkXGBRegressor.copy()SparkXGBRegressor.explainParam()SparkXGBRegressor.explainParams()SparkXGBRegressor.extractParamMap()SparkXGBRegressor.fit()SparkXGBRegressor.fitMultiple()SparkXGBRegressor.getFeaturesCol()SparkXGBRegressor.getLabelCol()SparkXGBRegressor.getOrDefault()SparkXGBRegressor.getParam()SparkXGBRegressor.getPredictionCol()SparkXGBRegressor.getValidationIndicatorCol()SparkXGBRegressor.getWeightCol()SparkXGBRegressor.hasDefault()SparkXGBRegressor.hasParam()SparkXGBRegressor.isDefined()SparkXGBRegressor.isSet()SparkXGBRegressor.load()SparkXGBRegressor.paramsSparkXGBRegressor.read()SparkXGBRegressor.save()SparkXGBRegressor.set()SparkXGBRegressor.setParams()SparkXGBRegressor.set_coll_cfg()SparkXGBRegressor.set_device()SparkXGBRegressor.uidSparkXGBRegressor.write()
SparkXGBRegressorModelSparkXGBRegressorModel.clear()SparkXGBRegressorModel.copy()SparkXGBRegressorModel.explainParam()SparkXGBRegressorModel.explainParams()SparkXGBRegressorModel.extractParamMap()SparkXGBRegressorModel.getFeaturesCol()SparkXGBRegressorModel.getLabelCol()SparkXGBRegressorModel.getOrDefault()SparkXGBRegressorModel.getParam()SparkXGBRegressorModel.getPredictionCol()SparkXGBRegressorModel.getValidationIndicatorCol()SparkXGBRegressorModel.getWeightCol()SparkXGBRegressorModel.get_booster()SparkXGBRegressorModel.get_feature_importances()SparkXGBRegressorModel.hasDefault()SparkXGBRegressorModel.hasParam()SparkXGBRegressorModel.isDefined()SparkXGBRegressorModel.isSet()SparkXGBRegressorModel.load()SparkXGBRegressorModel.paramsSparkXGBRegressorModel.read()SparkXGBRegressorModel.save()SparkXGBRegressorModel.set()SparkXGBRegressorModel.set_coll_cfg()SparkXGBRegressorModel.set_device()SparkXGBRegressorModel.transform()SparkXGBRegressorModel.uidSparkXGBRegressorModel.write()
SparkXGBRankerSparkXGBRanker.clear()SparkXGBRanker.copy()SparkXGBRanker.explainParam()SparkXGBRanker.explainParams()SparkXGBRanker.extractParamMap()SparkXGBRanker.fit()SparkXGBRanker.fitMultiple()SparkXGBRanker.getFeaturesCol()SparkXGBRanker.getLabelCol()SparkXGBRanker.getOrDefault()SparkXGBRanker.getParam()SparkXGBRanker.getPredictionCol()SparkXGBRanker.getValidationIndicatorCol()SparkXGBRanker.getWeightCol()SparkXGBRanker.hasDefault()SparkXGBRanker.hasParam()SparkXGBRanker.isDefined()SparkXGBRanker.isSet()SparkXGBRanker.load()SparkXGBRanker.paramsSparkXGBRanker.read()SparkXGBRanker.save()SparkXGBRanker.set()SparkXGBRanker.setParams()SparkXGBRanker.set_coll_cfg()SparkXGBRanker.set_device()SparkXGBRanker.uidSparkXGBRanker.write()
SparkXGBRankerModelSparkXGBRankerModel.clear()SparkXGBRankerModel.copy()SparkXGBRankerModel.explainParam()SparkXGBRankerModel.explainParams()SparkXGBRankerModel.extractParamMap()SparkXGBRankerModel.getFeaturesCol()SparkXGBRankerModel.getLabelCol()SparkXGBRankerModel.getOrDefault()SparkXGBRankerModel.getParam()SparkXGBRankerModel.getPredictionCol()SparkXGBRankerModel.getValidationIndicatorCol()SparkXGBRankerModel.getWeightCol()SparkXGBRankerModel.get_booster()SparkXGBRankerModel.get_feature_importances()SparkXGBRankerModel.hasDefault()SparkXGBRankerModel.hasParam()SparkXGBRankerModel.isDefined()SparkXGBRankerModel.isSet()SparkXGBRankerModel.load()SparkXGBRankerModel.paramsSparkXGBRankerModel.read()SparkXGBRankerModel.save()SparkXGBRankerModel.set()SparkXGBRankerModel.set_coll_cfg()SparkXGBRankerModel.set_device()SparkXGBRankerModel.transform()SparkXGBRankerModel.uidSparkXGBRankerModel.write()
- Collective
- Supported Python data structures
- Callback Functions
- XGBoost Python Feature Walkthrough
- XGBoost Dask Feature Walkthrough
- Survival Analysis Walkthrough
- Using XGBoost with RAPIDS Memory Manager (RMM) plugin