Package classifiers :: Module l_classifier_guts :: Class l_classifier
[frames] | no frames]

Class l_classifier

source code


This is a linear discriminant classifier.

Instance Methods
 
__init__(self, cdesc=None, models=None, trainingset_name=None, uid=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
P(self, datum, whichclass=None)
Determine the probability of being in each class. (Inherited from classifiers.q_classifier_r.classifier)
source code
 
__repr__(self)
str(x) (Inherited from classifiers.q_classifier_r.classifier)
source code
 
__str__(self)
str(x) (Inherited from classifiers.q_classifier_r.classifier)
source code
 
add_info(self, k, v) (Inherited from classifiers.q_classifier_r.classifier) source code
 
add_model(self, classname, model)
Add a class to an existing classifier. (Inherited from classifiers.q_classifier_r.classifier)
source code
 
bestc(self, datum)
Determine the best class for a datum. (Inherited from classifiers.q_classifier_r.classifier)
source code
 
list_classes(self) (Inherited from classifiers.q_classifier_r.classifier) source code
 
list_wrong_classifications(self, classdata) (Inherited from classifiers.q_classifier_r.classifier) source code
 
logP(self, datum, whichclass=None) (Inherited from classifiers.q_classifier_r.classifier) source code
 
logPv(self, datum)
Determine the probability of being in each class. (Inherited from classifiers.q_classifier_r.classifier)
source code
 
logPw(self, datum, whichclass, constrain)
Determine the probability of datum being in whichclass. (Inherited from classifiers.q_classifier_r.classifier)
source code
 
writer(self, dcw)
Write this classifier out (usually to a data file). (Inherited from classifiers.q_classifier_r.classifier)
source code

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

Class Variables
  HUGE = 1e+30 (Inherited from classifiers.q_classifier_r.classifier)
Properties

Inherited from object: __class__

Method Details

__init__(self, cdesc=None, models=None, trainingset_name=None, uid=None)
(Constructor)

source code 

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

Parameters:
  • models - a dictionary containg a probabilistic model for each class
  • info - not used in the internal operation of the classifier, but it is stuff that is important to write out.
Overrides: object.__init__
(inherited documentation)