Package classifiers :: Module q_classifier_r :: Class datum_tr
[frames] | no frames]

Class datum_tr

source code


This is a datum where we know the true class, presumably in the training set.

Instance Methods
 
__init__(self, vector, classid, uid=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
repr(x)
source code
 
__repr__(self)
repr(x)
source code
 
__cmp__(self, other) (Inherited from classifiers.q_classifier_r.datum_c) source code

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

Instance Variables
str classid
the name of the class to which the datum belongs.
str uid
a string that identfies a particular datum. (Inherited from classifiers.q_classifier_r.datum_c)
numpy.ndarray value
a feature vector (Inherited from classifiers.q_classifier_r.datum_c)
Properties

Inherited from object: __class__

Method Details

__init__(self, vector, classid, uid=None)
(Constructor)

source code 

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

Parameters:
  • vector - a vector of numbers
  • uid (str) - an arbitrary identifier for a datum
  • classid (str) - is the true class,
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

repr(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)