hyperimpute.plugins.prediction.regression.plugin_xgboost_regressor module

class XGBoostRegressorPlugin(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, n_estimators: int = 100, max_depth: Optional[int] = 3, lr: Optional[float] = None, random_state: int = 0, subsample: Optional[float] = None, min_child_weight: Optional[int] = None, max_bin: int = 256, booster: int = 0, grow_policy: int = 0, eta: float = 0.3, hyperparam_search_iterations: Optional[int] = None, **kwargs: Any)

Bases: RegressionPlugin

Classification plugin based on the XGBoostRegressor.

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 XGBoostRegressor 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.

  • learning_rate – 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.

  • tree_method – str Specify which tree method to use. Default to auto. If this parameter is set to default, XGBoostRegressor will choose the most conservative option available.

  • random_state – float Random number seed.

Example

>>> from hyperimpute.plugins.prediction import Predictions
>>> plugin = Predictions(category="regressors").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) XGBoostRegressorPlugin
_predict(X: DataFrame, *args: Any, **kwargs: Any) DataFrame
grow_policy = ['depthwise', 'lossguide']
static hyperparameter_space(*args: Any, **kwargs: Any) List[Params]
module_relative_path: Optional[Path]
static name() str
plugin

alias of XGBoostRegressorPlugin