class_docstr: Binary Relevance adapted kNN Multi-Label Classifier base class.
class_docstr_tok: ["Binary","Relevance","adapted","kNN","Multi-Label","Classifier","base","class","."]
docstr: Predict labels for X
  
  Parameters
  ----------
  X : numpy.ndarray or scipy.sparse.csc_matrix
      input features of shape :code:`(n_samples, n_features)`
  
  Returns
  -------
  scipy.sparse of int
      binary indicator matrix with label assignments with shape
      :code:`(n_samples, n_labels)`
docstr_tok: ["Predict","labels","for","X","Parameters","--","--","--","--","--","X",":","numpy.ndarray","or","scipy.sparse.csc_matrix","input","features","of","shape",":","code",":","`","(","n_samples",",","n_features",")","`","Returns","--","--","--","-","scipy.sparse","of","int","binary","indicator","matrix","with","label","assignments","with","shape",":","code",":","`","(","n_samples",",","n_labels",")","`"]
code: def predict(self, X):
      """Predict labels for X
  
      Parameters
      ----------
      X : numpy.ndarray or scipy.sparse.csc_matrix
          input features of shape :code:`(n_samples, n_features)`
  
      Returns
      -------
      scipy.sparse of int
          binary indicator matrix with label assignments with shape
          :code:`(n_samples, n_labels)`
      """
      self.neighbors_ = self.knn_.kneighbors(
          X, self.k, return_distance=False
      )
      self.confidences_ = np.vstack(
          [
              self.train_labelspace[n, :].tocsc().sum(axis=0) / self.k
              for n in self.neighbors_
          ]
      )
      return self._predict_variant(X)
  
file_path: scikit-multilearn/skmultilearn/adapt/brknn.py
imports: from builtins import range
  from ..base import MLClassifierBase
  from ..utils import get_matrix_in_format
  from sklearn.neighbors import NearestNeighbors
  import scipy.sparse
  import numpy
label_desc: Use image node_id 3 for calling the _BinaryRelevanceKNN obj's underlying member method code with example usage: obj.predict(X) and returns: self