class_docstr: Wrapper for the MEKA classifier
  
  Allows using MEKA, WEKA and some of MULAN classifiers from scikit-compatible API. For more information on
  how to use this class see the tutorial: :doc:`../meka`
  
  Parameters
  ----------
  meka_classifier : str
      The MEKA classifier string and parameters from the MEKA API,
      such as :code:`meka.classifiers.multilabel.MULAN -S RAkEL2`
  weka_classifier : str
      The WEKA classifier string and parameters from the WEKA API,
      such as :code:`weka.classifiers.trees.J48`
  java_command : str
      Path to test the java command
  meka_classpath: str
      Path to the MEKA class path folder, usually the folder lib
      in the directory MEKA was extracted into
  
  Attributes
  ----------
  output_ : str
      the full text output of MEKA command
  
  References
  ----------
  
  If you use this wrapper please also cite:
  
  .. code-block :: latex
  
      @article{MEKA,
          author = {Read, Jesse and Reutemann, Peter and Pfahringer, Bernhard and Holmes, Geoff},
          title = {{MEKA}: A Multi-label/Multi-target Extension to {Weka}},
          journal = {Journal of Machine Learning Research},
          year = {2016},
          volume = {17},
          number = {21},
          pages = {1--5},
          url = {http://jmlr.org/papers/v17/12-164.html},
      }
  
      @article{Hall:2009:WDM:1656274.1656278,
          author = {Hall, Mark and Frank, Eibe and Holmes, Geoffrey and Pfahringer, Bernhard and Reutemann, Peter and Witten, Ian H.},
          title = {The WEKA Data Mining Software: An Update},
          journal = {SIGKDD Explor. Newsl.},
          issue_date = {June 2009},
          volume = {11},
          number = {1},
          month = nov,
          year = {2009},
          issn = {1931-0145},
          pages = {10--18},
          numpages = {9},
          url = {http://doi.acm.org/10.1145/1656274.1656278},
          doi = {10.1145/1656274.1656278},
          acmid = {1656278},
          publisher = {ACM},
          address = {New York, NY, USA},
      }
  
  Examples
  --------
  
  Here's an example of performing Label Powerset classification using MEKA with a WEKA Naive Bayes classifier.
  
  .. code-block:: python
  
      from skmultilearn.ext import Meka, download_meka
  
      meka = Meka(
          meka_classifier = "meka.classifiers.multilabel.LC",
          weka_classifier = "weka.classifiers.bayes.NaiveBayes",
          meka_classpath = download_meka(),
          java_command = '/usr/bin/java')
  
      meka.fit(X_train, y_train)
      predictions = meka.predict(X_test)
class_docstr_tok: ["Wrapper","for","the","MEKA","classifier","Allows","using","MEKA",",","WEKA","and","some","of","MULAN","classifiers","from","scikit-compatible","API",".","For","more","information","on","how","to","use","this","class","see","the","tutorial",":",":","doc",":","`","..","\/meka","`","Parameters","--","--","--","--","--","meka_classifier",":","str","The","MEKA","classifier","string","and","parameters","from","the","MEKA","API",",","such","as",":","code",":","`","meka.classifiers.multilabel.MULAN","-S","RAkEL2","`","weka_classifier",":","str","The","WEKA","classifier","string","and","parameters","from","the","WEKA","API",",","such","as",":","code",":","`","weka.classifiers.trees.J48","`","java_command",":","str","Path","to","test","the","java","command","meka_classpath",":","str","Path","to","the","MEKA","class","path","folder",",","usually","the","folder","lib","in","the","directory","MEKA","was","extracted","into","Attributes","--","--","--","--","--","output_",":","str","the","full","text","output","of","MEKA","command","References","--","--","--","--","--","If","you","use","this","wrapper","please","also","cite",":","..","code-block",":",":","latex","@","article","{","MEKA",",","author","=","{","Read",",","Jesse","and","Reutemann",",","Peter","and","Pfahringer",",","Bernhard","and","Holmes",",","Geoff","}",",","title","=","{","{","MEKA","}",":","A","Multi-label\/Multi-target","Extension","to","{","Weka","}","}",",","journal","=","{","Journal","of","Machine","Learning","Research","}",",","year","=","{","2016","}",",","volume","=","{","17","}",",","number","=","{","21","}",",","pages","=","{","1","--","5","}",",","url","=","{","http",":","\/\/jmlr.org\/papers\/v17\/12-164.html","}",",","}","@","article","{","Hall:2009",":","WDM:1656274.1656278",",","author","=","{","Hall",",","Mark","and","Frank",",","Eibe","and","Holmes",",","Geoffrey","and","Pfahringer",",","Bernhard","and","Reutemann",",","Peter","and","Witten",",","Ian","H.","}",",","title","=","{","The","WEKA","Data","Mining","Software",":","An","Update","}",",","journal","=","{","SIGKDD","Explor",".","Newsl",".","}",",","issue_date","=","{","June","2009","}",",","volume","=","{","11","}",",","number","=","{","1","}",",","month","=","nov",",","year","=","{","2009","}",",","issn","=","{","1931-0145","}",",","pages","=","{","10","--","18","}",",","numpages","=","{","9","}",",","url","=","{","http",":","\/\/doi.acm.org\/10.1145\/1656274.1656278","}",",","doi","=","{","10.1145\/1656274.1656278","}",",","acmid","=","{","1656278","}",",","publisher","=","{","ACM","}",",","address","=","{","New","York",",","NY",",","USA","}",",","}","Examples","--","--","--","--","Here","'s","an","example","of","performing","Label","Powerset","classification","using","MEKA","with","a","WEKA","Naive","Bayes","classifier",".","..","code-block",":",":","python","from","skmultilearn.ext","import","Meka",",","download_meka","meka","=","Meka","(","meka_classifier","=","``","meka.classifiers.multilabel.LC","''",",","weka_classifier","=","``","weka.classifiers.bayes.NaiveBayes","''",",","meka_classpath","=","download_meka","(",")",",","java_command","=","'\/usr\/bin\/java","'",")","meka.fit","(","X_train",",","y_train",")","predictions","=","meka.predict","(","X_test",")"]
code: def __init__(
      self,
      meka_classifier=None,
      weka_classifier=None,
      java_command=None,
      meka_classpath=None,
  ):
      super(Meka, self).__init__()
  
      self.java_command = java_command
      if self.java_command is None:
          # TODO: this will not be needed once we're python 3 ready - we will
          # use it only in python 2.7 cases
          from whichcraft import which
  
          self.java_command = which("java")
  
          if self.java_command is None:
              raise ValueError("Java not found")
  
      self.meka_classpath = meka_classpath
      if self.meka_classpath is None:
          self.meka_classpath = os.environ.get("MEKA_CLASSPATH")
  
          if self.meka_classpath is None:
              raise ValueError("No meka classpath defined")
  
      self.meka_classifier = meka_classifier
      self.weka_classifier = weka_classifier
  
      self.copyable_attrs = [
          "meka_classifier",
          "weka_classifier",
          "java_command",
          "meka_classpath",
      ]
      self.output_ = None
      self._verbosity = 5
      self._warnings = None
      self.require_dense = [False, False]
  
      self._clean()
  
imports: import os
  import shlex
  import subprocess
  import sys
  import tempfile
  import zipfile
  from builtins import filter
  from builtins import map
  from builtins import range
  from builtins import str
  import scipy.sparse
  from ..base import MLClassifierBase
  from ..dataset import save_to_arff, get_data_home, _download_single_file, _get_md5
label_desc: Use image node_id 1 to create a new Meka object from inherited base classes: MLClassifierBase with example: obj = Meka(meka_classifier, weka_classifier, java_command, meka_classpath)