class_docstr: LightGBM model: https://lightgbm.readthedocs.io/en/latest/
  
  Hyperparameter options: https://lightgbm.readthedocs.io/en/latest/Parameters.html
  
  Extra hyperparameter options:
      ag.early_stop : int, specifies the early stopping rounds. Defaults to an adaptive strategy. Recommended to keep default.
class_docstr_tok: ["LightGBM","model",":","https",":","\/\/lightgbm.readthedocs.io\/en\/latest\/","Hyperparameter","options",":","https",":","\/\/lightgbm.readthedocs.io\/en\/latest\/Parameters.html","Extra","hyperparameter","options",":","ag.early_stop",":","int",",","specifies","the","early","stopping","rounds",".","Defaults","to","an","adaptive","strategy",".","Recommended","to","keep","default","."]
code: def _predict_proba(self, X, num_cpus=0, **kwargs):
      X = self.preprocess(X, **kwargs)
  
      y_pred_proba = self.model.predict(X, num_threads=num_cpus)
      if self.problem_type == REGRESSION:
          return y_pred_proba
      elif self.problem_type == BINARY:
          if len(y_pred_proba.shape) == 1:
              return y_pred_proba
          elif y_pred_proba.shape[1] > 1:
              return y_pred_proba[:, 1]
          else:
              return y_pred_proba
      elif self.problem_type == MULTICLASS:
          return y_pred_proba
      elif self.problem_type == SOFTCLASS:  # apply softmax
          y_pred_proba = np.exp(y_pred_proba)
          y_pred_proba = np.multiply(
              y_pred_proba,
              1 / np.sum(y_pred_proba, axis=1)[:, np.newaxis],
          )
          return y_pred_proba
      else:
          if len(y_pred_proba.shape) == 1:
              return y_pred_proba
          elif y_pred_proba.shape[1] > 2:  # Should this ever happen?
              return y_pred_proba
          else:  # Should this ever happen?
              return y_pred_proba[:, 1]
  
imports: import gc
  import logging
  import os
  import random
  import re
  import time
  import warnings
  import numpy
  from pandas import DataFrame, Series
  from autogluon.common.features.types import R_BOOL, R_CATEGORY, R_FLOAT, R_INT
  from autogluon.common.utils.pandas_utils import get_approximate_df_mem_usage
  from autogluon.common.utils.resource_utils import ResourceManager
  from autogluon.common.utils.try_import import try_import_lightgbm
  from autogluon.core.constants import BINARY, MULTICLASS, QUANTILE, REGRESSION, SOFTCLASS
  from autogluon.core.models import AbstractModel
  from autogluon.core.models._utils import get_early_stopping_rounds
  from .None import lgb_utils
  from .hyperparameters.parameters import DEFAULT_NUM_BOOST_ROUND, get_lgb_objective, get_param_baseline
  from .hyperparameters.searchspaces import get_default_searchspace
  from .lgb_utils import construct_dataset, train_lgb_model
label_desc: Use image node_id 7 for calling the LGBModel obj's underlying member method code with example usage: obj._predict_proba(X, num_cpus) and returns: y_pred_proba, y_pred_proba, y_pred_proba, y_pred_proba, y_pred_proba, y_pred_proba, y_pred_proba, y_pred_proba, y_pred_proba