docstr: Automated xgboost classifier
  
  Example:
      >>> search_space = {"n_estimators": hp.grid_search([50, 1000]),
                          "max_depth": hp.grid_search([2, 15]),
                          "lr": hp.loguniform(1e-4, 1e-1)}
      >>> auto_xgb_clf = AutoXGBClassifier(cpus_per_trial=4,
                                           name="auto_xgb_classifier",
                                           **config)
      >>> auto_xgb_clf.fit(data=(X_train, y_train),
                           validation_data=(X_val, y_val),
                           metric="error",
                           metric_mode="min",
                           n_sampling=1,
                           search_space=search_space)
      >>> best_model = auto_xgb_clf.get_best_model()
  
  :param logs_dir: Local directory to save logs and results. It defaults to
      "/tmp/auto_xgb_classifier_logs"
  :param cpus_per_trial: Int. Number of cpus for each trial. It defaults to 1.
      The value will also be assigned to n_jobs in xgboost,
      which is the number of parallel threads used to run xgboost.
  :param name: Name of the auto xgboost classifier.
  :param remote_dir: String. Remote directory to sync training results and checkpoints. It
      defaults to None and doesn't take effects while running in local. While running in
      cluster, it defaults to "hdfs:///tmp/{name}".
  :param xgb_configs: Other scikit learn xgboost parameters. You may refer to
     https://xgboost.readthedocs.io/en/latest/python/python_api.html#module-xgboost.sklearn
     for the parameter names to specify. Note that we will directly use cpus_per_trial value
     for n_jobs in xgboost and you shouldn't specify n_jobs again.
code: def __init__(
      self,
      logs_dir: str = "/tmp/auto_xgb_classifier_logs",
      cpus_per_trial: int = 1,
      name: Optional[str] = None,
      remote_dir: Optional[str] = None,
      **xgb_configs,
  ) -> None:
      """
      Automated xgboost classifier
  
      Example:
          >>> search_space = {"n_estimators": hp.grid_search([50, 1000]),
                              "max_depth": hp.grid_search([2, 15]),
                              "lr": hp.loguniform(1e-4, 1e-1)}
          >>> auto_xgb_clf = AutoXGBClassifier(cpus_per_trial=4,
                                               name="auto_xgb_classifier",
                                               **config)
          >>> auto_xgb_clf.fit(data=(X_train, y_train),
                               validation_data=(X_val, y_val),
                               metric="error",
                               metric_mode="min",
                               n_sampling=1,
                               search_space=search_space)
          >>> best_model = auto_xgb_clf.get_best_model()
  
      :param logs_dir: Local directory to save logs and results. It defaults to
          "/tmp/auto_xgb_classifier_logs"
      :param cpus_per_trial: Int. Number of cpus for each trial. It defaults to 1.
          The value will also be assigned to n_jobs in xgboost,
          which is the number of parallel threads used to run xgboost.
      :param name: Name of the auto xgboost classifier.
      :param remote_dir: String. Remote directory to sync training results and checkpoints. It
          defaults to None and doesn't take effects while running in local. While running in
          cluster, it defaults to "hdfs:///tmp/{name}".
      :param xgb_configs: Other scikit learn xgboost parameters. You may refer to
         https://xgboost.readthedocs.io/en/latest/python/python_api.html#module-xgboost.sklearn
         for the parameter names to specify. Note that we will directly use cpus_per_trial value
         for n_jobs in xgboost and you shouldn't specify n_jobs again.
      """
      xgb_model_builder = XGBoostModelBuilder(
          model_type="classifier",
          cpus_per_trial=cpus_per_trial,
          **xgb_configs,
      )
      resources_per_trial = (
          {"cpu": cpus_per_trial} if cpus_per_trial else None
      )
      super().__init__(
          model_builder=xgb_model_builder,
          logs_dir=logs_dir,
          resources_per_trial=resources_per_trial,
          remote_dir=remote_dir,
          name=name,
      )
  
file_path: BigDL/python/orca/src/bigdl/orca/automl/xgboost/auto_xgb.py
imports: from bigdl.orca.automl.xgboost.XGBoost import XGBoostModelBuilder
  from bigdl.orca.automl.auto_estimator import AutoEstimator
  from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple, Union
label_desc: Use image node_id 1 to create a new AutoXGBClassifier object from inherited base classes: AutoEstimator with example: obj = AutoXGBClassifier(logs_dir, cpus_per_trial, name, remote_dir)