Package miopia :: Package classifier :: Module WekaClassificationStrategy :: Class WekaClassificationStrategy
[hide private]
[frames] | no frames]

Class WekaClassificationStrategy

source code

                                   object --+    
                                            |    
ClassificationStrategy.ClassificationStrategy --+
                                                |
                                               WekaClassificationStrategy
Known Subclasses:

classdocs

Instance Methods [hide private]
 
__init__(self, path_weka, model)
Constructor
source code
 
train(self, output_model, output_file, arff_training_file, arff_development_file=None) source code
 
classify(self, arff_file, results_file, dict_position_instanceid) source code

Inherited from ClassificationStrategy.ClassificationStrategy: polarity, polarity_info

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

Class Variables [hide private]
  UNKWOWN_CLASS_SYMBOL = '?'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, path_weka, model)
(Constructor)

source code 

Constructor

Parameters:
  • path_weka - A string. The path to the WEKA.jar (and additional jar's depending on the selected classifier
  • model - A string. A path to a trained model. None if no trained model provided.
Overrides: object.__init__

train(self, output_model, output_file, arff_training_file, arff_development_file=None)

source code 
Parameters:
  • output_model - A string. The path where will be stored the trained model.
  • output_file - A string. The path where will be printed the training results.
  • arff_training_file - A string. The path to the training ARFF file.
  • arff_development_file - A string. The path to the development ARFF file. None if there is no development file.

classify(self, arff_file, results_file, dict_position_instanceid)

source code 
Parameters:
  • arff_file - A string. The path to the ARFF file to be classified
  • results_file - A string. The path where will be printed the WEKA classifications.