Package ml :: Package lib :: Module orange :: Class OrangeClassifier
[hide private]
[frames] | no frames]

Class OrangeClassifier

source code

                  object --+        
                           |        
      Orange.core.OrangeBase --+    
                               |    
Orange.classification.Classifier --+
                                   |
                                  OrangeClassifier

Wrapper around an orange classifier object

Instance Methods [hide private]
 
__init__(self, learner, **kwargs)
Constructor.
source code
 
set_training_data(self, jcml_filename, class_name, desired_attributes, meta_attributes, **kwargs)
Read the data from an XML file, convert them to the proper format and remember its location
source code
 
load_training_data(self)
Load the previously defined/converted training data in place
source code
 
unload_training_data(self)
Free up the memory occupied by the training data
source code
 
cross_validation_scores(self, folds=10)
Perform cross validation on the training data.
source code
 
train(self) source code
 
_write_model_svm(self, basename) source code
 
_write_model_rules(self, basename) source code
 
_write_model_tree(self, basename) source code
 
write_model_description(self, basename)
Method-specific functions for writing the model characteristics into a file
source code
 
set_test_data(self, jcml_filename, class_name, desired_attributes, meta_attributes, output_file, **kwargs)
Read the data from an XML file, convert them to the proper format and remember its location
source code
 
load_test_data(self) source code
 
unload_test_data(self) source code
 
unload(self) source code

Inherited from Orange.classification.Classifier: __call__, __new__, __reduce__

Inherited from Orange.core.OrangeBase: __delattr__, __getattribute__, __hash__, __nonzero__, __repr__, __setattr__, __str__, clone, dump, reference, setattr, typeid, write

Inherited from object: __format__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from Orange.classification.Classifier: GetBoth, GetProbabilities, GetValue

Instance Variables [hide private]
  learner
the wrapped orange class
Orange.classification.Classifier model
the trained classifier
str test_data_filename
the jcml test file
  test_table
the Orange "table" of test examples @type \Orange.data.Table
str training_data_filename
the jcml training file
  training_table
an Orange "table" of examples containing training instances @type \Orange.data.Table
Properties [hide private]

Inherited from Orange.core.OrangeBase: name

Inherited from object: __class__

Method Details [hide private]

__init__(self, learner, **kwargs)
(Constructor)

source code 

Constructor.

Parameters:
  • learner () - an orange classifier whose functionality is to be wrapped
Overrides: object.__init__

set_training_data(self, jcml_filename, class_name, desired_attributes, meta_attributes, **kwargs)

source code 

Read the data from an XML file, convert them to the proper format and remember its location

Parameters:
  • jcml_filename (string) - full path of the XML file where data reside
  • class_name (string) - name of class
  • desired_attributes (list of strings) - desired attributes
  • meta_attributes (list of strings) - meta attributes

cross_validation_scores(self, folds=10)

source code 

Perform cross validation on the training data.

Parameters:
  • folds - number of cross-validation folds
Returns:
the value of the classification accuracy @

write_model_description(self, basename)

source code 

Method-specific functions for writing the model characteristics into a file

Parameters:
  • basename (string) - specify part of the filename which will be written

set_test_data(self, jcml_filename, class_name, desired_attributes, meta_attributes, output_file, **kwargs)

source code 

Read the data from an XML file, convert them to the proper format and remember its location

Parameters:
  • jcml_filename (string) - full path of the XML file where data reside
  • class_name (string) - name of class
  • desired_attributes (list of strings) - desired attributes
  • meta_attributes (list of strings) - meta attributes