docstr: Predict with data. The full model will be used unless
  `iteration_range` is specified, meaning user have to either slice the
  model or use the ``best_iteration`` attribute to get prediction from
  best model returned from early stopping.
  
  Parameters
  ----------
  data
      The array storing the input.
  output_margin
      Whether to output the raw untransformed margin value.
  pred_leaf
      When this option is on, the output will be a matrix of (nsample,
      ntrees) with each record indicating the predicted leaf index of
      each sample in each tree.  Note that the leaf index of a tree is
      unique per tree, so you may find leaf 1 in both tree 1 and tree 0.
  pred_contribs
      When this is True the output will be a matrix of size (nsample,
      nfeats + 1) with each record indicating the feature contributions
      (SHAP values) for that prediction. The sum of all feature
      contributions is equal to the raw untransformed margin value of the
      prediction. Note the final column is the bias term.
  approx_contribs
      Approximate the contributions of each feature.  Used when ``pred_contribs``
      or ``pred_interactions`` is set to True.  Changing the default of this
      parameter (False) is not recommended.
  pred_interactions
      When this is True the output will be a matrix of size (nsample,
      nfeats + 1, nfeats + 1) indicating the SHAP interaction values for
      each pair of features. The sum of each row (or column) of the
      interaction values equals the corresponding SHAP value (from
      pred_contribs), and the sum of the entire matrix equals the raw
      untransformed margin value of the prediction. Note the last row and
      column correspond to the bias term.
  validate_features
      When this is True, validate that the Booster's and data's
      feature_names are identical.  Otherwise, it is assumed that the
      feature_names are the same.
  training
      Whether the prediction value is used for training.  This can effect `dart`
      booster, which performs dropouts during training iterations but use all
      trees for inference. If you want to obtain result with dropouts, set this
      parameter to `True`.  Also, the parameter is set to true when obtaining
      prediction for custom objective function.
  iteration_range
      Specifies which layer of trees are used in prediction.  For example, if a
      random forest is trained with 100 rounds.  Specifying `iteration_range=(10,
      20)`, then only the forests built during [10, 20) (half open set) rounds are
      used in this prediction. Unsupported for gblinear booster.
  strict_shape
      When set to True, output shape is invariant to whether classification is
      used.
      For both value and margin prediction, the output shape is (n_samples,
      n_groups), n_groups == 1 when multi-class is not used.  Default to False, in
      which case the output shape can be (n_samples, ) if multi-class is not used.
  
  Returns
  -------
  prediction : ivy array
code: def predict(
      self,
      data,
      output_margin=False,
      pred_leaf=False,
      pred_contribs=False,
      approx_contribs=False,
      pred_interactions=False,
      validate_features=True,
      training=False,
      iteration_range=(0, 0),
      strict_shape=False,
  ):
      """Predict with data. The full model will be used unless
      `iteration_range` is specified, meaning user have to either slice the
      model or use the ``best_iteration`` attribute to get prediction from
      best model returned from early stopping.
  
      Parameters
      ----------
      data
          The array storing the input.
      output_margin
          Whether to output the raw untransformed margin value.
      pred_leaf
          When this option is on, the output will be a matrix of (nsample,
          ntrees) with each record indicating the predicted leaf index of
          each sample in each tree.  Note that the leaf index of a tree is
          unique per tree, so you may find leaf 1 in both tree 1 and tree 0.
      pred_contribs
          When this is True the output will be a matrix of size (nsample,
          nfeats + 1) with each record indicating the feature contributions
          (SHAP values) for that prediction. The sum of all feature
          contributions is equal to the raw untransformed margin value of the
          prediction. Note the final column is the bias term.
      approx_contribs
          Approximate the contributions of each feature.  Used when ``pred_contribs``
          or ``pred_interactions`` is set to True.  Changing the default of this
          parameter (False) is not recommended.
      pred_interactions
          When this is True the output will be a matrix of size (nsample,
          nfeats + 1, nfeats + 1) indicating the SHAP interaction values for
          each pair of features. The sum of each row (or column) of the
          interaction values equals the corresponding SHAP value (from
          pred_contribs), and the sum of the entire matrix equals the raw
          untransformed margin value of the prediction. Note the last row and
          column correspond to the bias term.
      validate_features
          When this is True, validate that the Booster's and data's
          feature_names are identical.  Otherwise, it is assumed that the
          feature_names are the same.
      training
          Whether the prediction value is used for training.  This can effect `dart`
          booster, which performs dropouts during training iterations but use all
          trees for inference. If you want to obtain result with dropouts, set this
          parameter to `True`.  Also, the parameter is set to true when obtaining
          prediction for custom objective function.
      iteration_range
          Specifies which layer of trees are used in prediction.  For example, if a
          random forest is trained with 100 rounds.  Specifying `iteration_range=(10,
          20)`, then only the forests built during [10, 20) (half open set) rounds are
          used in this prediction. Unsupported for gblinear booster.
      strict_shape
          When set to True, output shape is invariant to whether classification is
          used.
          For both value and margin prediction, the output shape is (n_samples,
          n_groups), n_groups == 1 when multi-class is not used.  Default to False, in
          which case the output shape can be (n_samples, ) if multi-class is not used.
  
      Returns
      -------
      prediction : ivy array
      """
      # currently supports prediction for binary task
      # get raw predictions
      pred = self.gbm.pred(data)
      args = (self.gbm.obj, pred)
  
      if self.compile:
          return self._comp_binary_prediction(*args)
      else:
          return _binary_prediction(*args)
  
file_path: ivy/ivy/functional/frontends/xgboost/core.py
imports: import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from .gbm import GBLinear
label_desc: Use image node_id 3 for calling the Booster obj's underlying member method code with example usage: obj.predict(data, output_margin, pred_leaf, pred_contribs, approx_contribs, pred_interactions, validate_features, training, iteration_range, strict_shape) and returns: self, _binary_prediction