XGBoostClassifier Class
XGBoost Classifier class.
Initialize XGBoost Classifier class.
- Inheritance
-
sklearn.base.BaseEstimatorXGBoostClassifiersklearn.base.ClassifierMixinXGBoostClassifierazureml.training.tabular.models._abstract_model_wrapper._AbstractModelWrapperXGBoostClassifier
Constructor
XGBoostClassifier(random_state=0, n_jobs=1, problem_info=None, **kwargs)
Parameters
Name | Description |
---|---|
random_state
|
int or
<xref:np.random.RandomState>
RandomState instance or None, optional (default=None) If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random. default value: 0
|
n_jobs
|
Number of parallel threads. default value: 1
|
kwargs
Required
|
Other parameters Check https://xgboost.readthedocs.io/en/latest/parameter.html for more parameters. |
random_state
Required
|
int or
<xref:np.random.RandomState>
RandomState instance or None, optional (default=None) If int, random_state is the seed used by the random number generator. If RandomState instance, random_state is the random number generator. If None, the random number generator is the RandomState instance used by np.random. |
n_jobs
Required
|
Number of parallel threads. |
kwargs
Required
|
Other parameters Check https://xgboost.readthedocs.io/en/latest/parameter.html for more parameters. |
problem_info
|
default value: None
|
Methods
fit |
Fit function for XGBoost Classifier model. |
get_model |
Return XGBoost Classifier model. Else returns None. |
get_params |
Return parameters for XGBoost Classifier model. |
predict |
Prediction function for XGBoost Classifier model. |
predict_proba |
Prediction class probabilities for X for XGBoost Classifier model. |
fit
Fit function for XGBoost Classifier model.
fit(X, y, **kwargs)
Parameters
Name | Description |
---|---|
X
Required
|
Input data. |
y
Required
|
Input target values. |
kwargs
Required
|
other parameters Check https://xgboost.readthedocs.io/en/latest/parameter.html for more parameters. |
Returns
Type | Description |
---|---|
Self after fitting the model. |
get_model
Return XGBoost Classifier model.
Else returns None.
get_model()
Returns
Type | Description |
---|---|
Returns the fitted model if fit method has been called. |
get_params
Return parameters for XGBoost Classifier model.
get_params(deep=True)
Parameters
Name | Description |
---|---|
deep
|
If True, will return the parameters for this estimator and contained subobjects that are estimators. default value: True
|
Returns
Type | Description |
---|---|
Parameters for the XGBoost classifier model. |
predict
Prediction function for XGBoost Classifier model.
predict(X)
Parameters
Name | Description |
---|---|
X
Required
|
Input data. |
Returns
Type | Description |
---|---|
Prediction values from XGBoost Classifier model. |
predict_proba
Prediction class probabilities for X for XGBoost Classifier model.
predict_proba(X)
Parameters
Name | Description |
---|---|
X
Required
|
Input data. |
Returns
Type | Description |
---|---|
Prediction probability values from XGBoost Classifier model. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for