class_docstr: Class for importing XGBoost models.
docstr: Create a copy of the estimator that can be refit from scratch. Only supported for models of type XGBClassifier.
  
  :return: new estimator.
  :raises `NotImplementedError`: This method is not supported for Booster objects.
docstr_tok: ["Create","a","copy","of","the","estimator","that","can","be","refit","from","scratch",".","Only","supported","for","models","of","type","XGBClassifier",".",":","return",":","new","estimator",".",":","raises","`","NotImplementedError","`",":","This","method","is","not","supported","for","Booster","objects","."]
code: def clone_for_refitting(
      self,
  ) -> "XGBoostClassifier":
      """
      Create a copy of the estimator that can be refit from scratch. Only supported for models of type XGBClassifier.
  
      :return: new estimator.
      :raises `NotImplementedError`: This method is not supported for Booster objects.
      """
      import xgboost
  
      if isinstance(self._model, xgboost.XGBClassifier):
          params = self.get_params()
          del params["model"]
          internal_params = self._model.get_params()
          new_classifier = xgboost.XGBClassifier()
          new_classifier.set_params(**internal_params)
          new_estimator = XGBoostClassifier(new_classifier)
          new_estimator.set_params(**params)
          return new_estimator
  
      raise NotImplementedError
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from copy import deepcopy
  import json
  import logging
  import os
  import pickle
  from typing import List, Optional, Union, Tuple, TYPE_CHECKING
  import numpy
  from art.estimators.classification.classifier import ClassifierDecisionTree
  from art.utils import to_categorical
  from art import config
label_desc: Use image node_id 6 for calling the XGBoostClassifier obj's underlying member method code with example usage: obj.clone_for_refitting() and returns: new_estimator