Package PyML :: Package containers :: Module pairData :: Class SimplePairDataSet
[frames] | no frames]

Class SimplePairDataSet

source code

              object --+    
                       |    
baseDatasets.BaseDataSet --+
                           |
                          SimplePairDataSet

DataSet container for pairs of objects.

file format:

id1_id2, label,... (can have additional fields that are ignored)
Instance Methods
 
__init__(self, arg, **args)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
copyConstruct(self, other, patterns) source code
 
constructFromFile(self, fileName) source code
 
__len__(self) source code
 
getPair(self, i) source code

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

    Inherited from baseDatasets.BaseDataSet
 
attachKernel(self, kernel='linear', **args) source code
 
attachLabels(self, labels) source code
 
copy(self, other, patterns, deepcopy)
Each class that wants to use the generic copy constructor needs to define this function for doing class-specific copying
source code
 
getKernelMatrix(self)
returns the kernel matrix as a numpy array
source code
 
getTestingFunc(self) source code
 
getTrainingFunc(self) source code
 
registerAttribute(self, attributeName, attributeValue=None, action=None) source code
 
setTestingFunc(self, func) source code
 
setTrainingFunc(self, func) source code
 
test(self, trainingData, **args) source code
 
train(self, **args) source code
Class Variables
  isVector = False
    Inherited from baseDatasets.BaseDataSet
  testingFunc = property(getTestingFunc, setTestingFunc, None, '...
  trainingFunc = property(getTrainingFunc, setTrainingFunc, None...
  type = 'dataset'
Properties

Inherited from object: __class__

Method Details

__init__(self, arg, **args)
(Constructor)

source code 

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

Parameters:
  • arg - a file name or another PairDataSet object. if a file name is supplied the constructor expects a dataset object as a keyword argument 'data'
  • data - a dataset object from which the kernel between the pairs of patterns is derived.
  • patterns - patterns to copy when performing copy construction
Overrides: object.__init__

copyConstruct(self, other, patterns)

source code 
Overrides: baseDatasets.BaseDataSet.copyConstruct