hyperimpute.plugins.prediction.classifiers.plugin_xgboost module

class XGBoostPlugin(n_estimators: int = 100, reg_lambda: Optional[float] = None, reg_alpha: Optional[float] = None, colsample_bytree: Optional[float] = None, colsample_bynode: Optional[float] = None, colsample_bylevel: Optional[float] = None, max_depth: Optional[int] = 3, subsample: Optional[float] = None, lr: Optional[float] = None, min_child_weight: Optional[int] = None, max_bin: int = 256, booster: int = 0, grow_policy: int = 0, nthread: int = 1, random_state: int = 0, eta: float = 0.3, hyperparam_search_iterations: Optional[int] = None, **kwargs: Any)

Bases: ClassifierPlugin

Classification plugin based on the XGBoost classifier.

Method:

Gradient boosting is a supervised learning algorithm that attempts to accurately predict a target variable by combining an ensemble of estimates from a set of simpler and weaker models. The XGBoost algorithm has a robust handling of a variety of data types, relationships, distributions, and the variety of hyperparameters that you can fine-tune.

Parameters:
  • n_estimators – int The maximum number of estimators at which boosting is terminated.

  • max_depth – int Maximum depth of a tree.

  • reg_lambda – float L2 regularization term on weights (xgb’s lambda).

  • reg_alpha – float L1 regularization term on weights (xgb’s alpha).

  • colsample_bytree – float Subsample ratio of columns when constructing each tree.

  • colsample_bynode – float Subsample ratio of columns for each split.

  • colsample_bylevel – float Subsample ratio of columns for each level.

  • subsample – float Subsample ratio of the training instance.

  • lr – float Boosting learning rate

  • booster – str Specify which booster to use: gbtree, gblinear or dart.

  • min_child_weight – int Minimum sum of instance weight(hessian) needed in a child.

  • max_bin – int Number of bins for histogram construction.

  • random_state – float Random number seed.

Example

>>> from hyperimpute.plugins.prediction import Predictions
>>> plugin = Predictions(category="classifiers").get("xgboost")
>>> from sklearn.datasets import load_iris
>>> X, y = load_iris(return_X_y=True)
>>> plugin.fit_predict(X, y)
_abc_impl = <_abc_data object>
_fit(X: DataFrame, *args: Any, **kwargs: Any) XGBoostPlugin
_predict(X: DataFrame, *args: Any, **kwargs: Any) DataFrame
_predict_proba(X: DataFrame, *args: Any, **kwargs: Any) DataFrame
booster = ['gbtree', 'gblinear', 'dart']
grow_policy = ['depthwise', 'lossguide']
static hyperparameter_space(*args: Any, **kwargs: Any) List[Params]
module_relative_path: Optional[Path]
static name() str
plugin

alias of XGBoostPlugin