[docs]classGradientBoosting(SklearnMethod):""" Gradient Boosting classifier which wraps scikit-learn's GradientBoostingClassifier. Input arguments for the method are the same as supported by scikit-learn (see `GradientBoostingClassifier scikit-learn documentation <https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingClassifier.html>`_ for details). For usage instructions, check :py:obj:`~immuneML.ml_methods.classifiers.SklearnMethod.SklearnMethod`. **YAML specification:** .. indent with spaces .. code-block:: yaml definitions: ml_methods: my_gradient_boosting: GradientBoosting: # arguments as defined by scikit-learn n_estimators: 100 learning_rate: 0.1 max_depth: 3 random_state: 42 """def__init__(self,parameter_grid:dict=None,parameters:dict=None):super(GradientBoosting,self).__init__(parameter_grid=parameter_grid,parameters=parameters)def_get_ml_model(self,cores_for_training:int=2,X=None):params=copy.deepcopy(self._parameters)ifself._parametersisnotNoneelse{}returnGradientBoostingClassifier(**params)