docstr: Predict the target for the training data via leave-one-out.
  
  Returns
  -------
  y : ndarray of shape (n_queries,) or (n_queries, n_outputs), dtype=int
      Target values.
code: def predict_loo(self):
      """Predict the target for the training data via leave-one-out.
  
      Returns
      -------
      y : ndarray of shape (n_queries,) or (n_queries, n_outputs), dtype=int
          Target values.
      """
      neigh_dist, neigh_ind = self.kneighbors()
  
      weights = _get_weights(neigh_dist, self.weights)
  
      _y = self._y
      if _y.ndim == 1:
          _y = _y.reshape((-1, 1))
  
      if weights is None:
          y_pred = np.mean(_y[neigh_ind], axis=1)
      else:
          y_pred = np.empty(
              (len(neigh_dist), _y.shape[1]), dtype=np.float64
          )
          denom = np.sum(weights, axis=1)
  
          for j in range(_y.shape[1]):
              num = np.sum(_y[neigh_ind, j] * weights, axis=1)
              y_pred[:, j] = num / denom
  
      if self._y.ndim == 1:
          y_pred = y_pred.ravel()
  
      return y_pred
  
file_path: autogluon/tabular/src/autogluon/tabular/models/knn/_knn_loo_variants.py
imports: import logging
  import numpy
  from scipy import stats
  from sklearn.neighbors._base import _get_weights
  from sklearn.utils.extmath import weighted_mode
label_desc: Use image node_id 1 for calling the KNeighborsRegressorLOOMixin obj's underlying member method code with example usage: obj.predict_loo() and returns: y_pred