class_docstr: LightGBM classifier.
class_docstr_tok: ["LightGBM","classifier","."]
docstr: Docstring is inherited from the LGBMModel.
code: def predict(
      self,
      X: _LGBM_ScikitMatrixLike,
      raw_score: bool = False,
      start_iteration: int = 0,
      num_iteration: Optional[int] = None,
      pred_leaf: bool = False,
      pred_contrib: bool = False,
      validate_features: bool = False,
      **kwargs: Any,
  ):
      """Docstring is inherited from the LGBMModel."""
      result = self.predict_proba(
          X=X,
          raw_score=raw_score,
          start_iteration=start_iteration,
          num_iteration=num_iteration,
          pred_leaf=pred_leaf,
          pred_contrib=pred_contrib,
          validate_features=validate_features,
          **kwargs,
      )
      if (
          callable(self._objective)
          or raw_score
          or pred_leaf
          or pred_contrib
      ):
          return result
      else:
          class_index = np.argmax(result, axis=1)
          return self._le.inverse_transform(class_index)
  
imports: import copy
  from inspect import signature
  from pathlib import Path
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import scipy.sparse
  from .basic import Booster, Dataset, LightGBMError, _choose_param_value, _ConfigAliases, _LGBM_BoosterBestScoreType, _LGBM_CategoricalFeatureConfiguration, _LGBM_EvalFunctionResultType, _LGBM_FeatureNameConfiguration, _LGBM_GroupType, _LGBM_InitScoreType, _LGBM_LabelType, _LGBM_WeightType, _log_warning
  from .callback import _EvalResultDict, record_evaluation
  from .compat import SKLEARN_INSTALLED, LGBMNotFittedError, _LGBMAssertAllFinite, _LGBMCheckArray, _LGBMCheckClassificationTargets, _LGBMCheckSampleWeight, _LGBMCheckXY, _LGBMClassifierBase, _LGBMComputeSampleWeight, _LGBMCpuCount, _LGBMLabelEncoder, _LGBMModelBase, _LGBMRegressorBase, dt_DataTable, np_random_Generator, pd_DataFrame
  from .engine import train
label_desc: Use image node_id 2 for calling the LGBMClassifier obj's underlying member method code with example usage: obj.predict(X, raw_score, start_iteration, num_iteration, pred_leaf, pred_contrib, validate_features) and returns: result, self