Package nltk :: Package classify :: Module weka :: Class WekaClassifier
[hide private]
[frames] | no frames]

Class WekaClassifier

source code

     object --+    
              |    
api.ClassifierI --+
                  |
                 WekaClassifier

Instance Methods [hide private]
 
__init__(self, formatter, model_filename)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
list of ProbDistI
batch_prob_classify(self, featuresets)
Apply self.prob_classify() to each element of featuresets.
source code
list of label
batch_classify(self, featuresets)
Apply self.classify() to each element of featuresets.
source code
 
_batch_classify(self, featuresets, options) source code
 
parse_weka_distribution(self, s) source code
 
parse_weka_output(self, lines) source code

Inherited from api.ClassifierI: classify, labels, prob_classify

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

    Deprecated

Inherited from api.ClassifierI: batch_probdist, probdist

Class Methods [hide private]
 
train(cls, model_filename, featuresets, classifier='naivebayes', options=[], quiet=True) source code
Class Variables [hide private]
  _CLASSIFIER_CLASS = {'C4.5': 'weka.classifiers.trees.J48', 'ks...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, formatter, model_filename)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

batch_prob_classify(self, featuresets)

source code 

Apply self.prob_classify() to each element of featuresets. I.e.:

>>> return [self.prob_classify(fs) for fs in featuresets]
Returns: list of ProbDistI
Overrides: api.ClassifierI.batch_prob_classify
(inherited documentation)

batch_classify(self, featuresets)

source code 

Apply self.classify() to each element of featuresets. I.e.:

>>> return [self.classify(fs) for fs in featuresets]
Returns: list of label
Overrides: api.ClassifierI.batch_classify
(inherited documentation)

Class Variable Details [hide private]

_CLASSIFIER_CLASS

Value:
{'C4.5': 'weka.classifiers.trees.J48',
 'kstar': 'weka.classifiers.lazy.kstar',
 'log_regression': 'weka.classifiers.functions.Logistic',
 'naivebayes': 'weka.classifiers.bayes.NaiveBayes',
 'ripper': 'weka.classifiers.rules.JRip',
 'svm': 'weka.classifiers.functions.SMO'}