class_docstr: Distinct RAndom k-labELsets multi-label classifier.
  
  Divides the label space in to equal partitions of size k, trains a Label Powerset
  classifier per partition and predicts by summing the result of all trained classifiers.
  
  Parameters
  ----------
  base_classifier : sklearn.base
      the base classifier that will be used in a class, will be
      automatically put under :code:`self.classifier` for future
      access.
  base_classifier_require_dense : [bool, bool]
      whether the base classifier requires [input, output] matrices
      in dense representation, will be automatically
      put under :code:`self.require_dense`
  labelset_size : int
      the desired size of each of the partitions, parameter k according to paper
      Default is 3, according to paper it has the best results
  
  
  Attributes
  ----------
  _label_count : int
      the number of labels the classifier is fit to, set by :meth:`fit`
  
  model_count_ : int
      the number of sub classifiers trained, set by :meth:`fit`
  
  classifier_: :class:`skmultilearn.ensemble.LabelSpacePartitioningClassifier`
      the underneath classifier that perform the label space partitioning using a
      random clusterer :class:`skmultilearn.ensemble.RandomLabelSpaceClusterer`
  
  
  References
  ----------
  
  If you use this class please cite the paper introducing the method:
  
  .. code :: latex
  
      @ARTICLE{5567103,
          author={G. Tsoumakas and I. Katakis and I. Vlahavas},
          journal={IEEE Transactions on Knowledge and Data Engineering},
          title={Random k-Labelsets for Multilabel Classification},
          year={2011},
          volume={23},
          number={7},
          pages={1079-1089},
          doi={10.1109/TKDE.2010.164},
          ISSN={1041-4347},
          month={July},
      }
  
  Examples
  --------
  
  Here's a simple example of how to use this class with a base classifier from scikit-learn to teach
  non-overlapping classifiers each trained on at most four labels:
  
  .. code :: python
  
      from sklearn.naive_bayes import GaussianNB
      from skmultilearn.ensemble import RakelD
  
      classifier = RakelD(
          base_classifier=GaussianNB(),
          base_classifier_require_dense=[True, True],
          labelset_size=4
      )
  
      classifier.fit(X_train, y_train)
      prediction = classifier.predict(X_test)
class_docstr_tok: ["Distinct","RAndom","k-labELsets","multi-label","classifier",".","Divides","the","label","space","in","to","equal","partitions","of","size","k",",","trains","a","Label","Powerset","classifier","per","partition","and","predicts","by","summing","the","result","of","all","trained","classifiers",".","Parameters","--","--","--","--","--","base_classifier",":","sklearn.base","the","base","classifier","that","will","be","used","in","a","class",",","will","be","automatically","put","under",":","code",":","`","self.classifier","`","for","future","access",".","base_classifier_require_dense",":","[","bool",",","bool","]","whether","the","base","classifier","requires","[","input",",","output","]","matrices","in","dense","representation",",","will","be","automatically","put","under",":","code",":","`","self.require_dense","`","labelset_size",":","int","the","desired","size","of","each","of","the","partitions",",","parameter","k","according","to","paper","Default","is","3",",","according","to","paper","it","has","the","best","results","Attributes","--","--","--","--","--","_label_count",":","int","the","number","of","labels","the","classifier","is","fit","to",",","set","by",":","meth",":","`","fit","`","model_count_",":","int","the","number","of","sub","classifiers","trained",",","set","by",":","meth",":","`","fit","`","classifier_",":",":","class",":","`","skmultilearn.ensemble.LabelSpacePartitioningClassifier","`","the","underneath","classifier","that","perform","the","label","space","partitioning","using","a","random","clusterer",":","class",":","`","skmultilearn.ensemble.RandomLabelSpaceClusterer","`","References","--","--","--","--","--","If","you","use","this","class","please","cite","the","paper","introducing","the","method",":","..","code",":",":","latex","@","ARTICLE","{","5567103",",","author=","{","G.","Tsoumakas","and","I.","Katakis","and","I.","Vlahavas","}",",","journal=","{","IEEE","Transactions","on","Knowledge","and","Data","Engineering","}",",","title=","{","Random","k-Labelsets","for","Multilabel","Classification","}",",","year=","{","2011","}",",","volume=","{","23","}",",","number=","{","7","}",",","pages=","{","1079-1089","}",",","doi=","{","10.1109\/TKDE.2010.164","}",",","ISSN=","{","1041-4347","}",",","month=","{","July","}",",","}","Examples","--","--","--","--","Here","'s","a","simple","example","of","how","to","use","this","class","with","a","base","classifier","from","scikit-learn","to","teach","non-overlapping","classifiers","each","trained","on","at","most","four","labels",":","..","code",":",":","python","from","sklearn.naive_bayes","import","GaussianNB","from","skmultilearn.ensemble","import","RakelD","classifier","=","RakelD","(","base_classifier=GaussianNB","(",")",",","base_classifier_require_dense=","[","True",",","True","]",",","labelset_size=4",")","classifier.fit","(","X_train",",","y_train",")","prediction","=","classifier.predict","(","X_test",")"]
docstr: Predict label assignments
  
  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","label","assignments","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 label assignments
  
      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)`
      """
  
      return self.classifier_.predict(X)
  
file_path: scikit-multilearn/skmultilearn/ensemble/rakeld.py
imports: import numpy
  from .partition import LabelSpacePartitioningClassifier
  from ..cluster.random import RandomLabelSpaceClusterer
  from ..problem_transform import LabelPowerset
  from ..base import MLClassifierBase
label_desc: Use image node_id 3 for calling the RakelD obj's underlying member method code with example usage: obj.predict(X) and returns: self