Package PyML :: Package containers :: Module vectorDatasets :: Class BaseCVectorDataSet
[frames] | no frames]

Class BaseCVectorDataSet

source code

                object --+        
                         |        
  baseDatasets.BaseDataSet --+    
                             |    
   baseDatasets.WrapperDataSet --+
                                 |
                object --+       |
                         |       |
  baseDatasets.BaseDataSet --+   |
                             |   |
baseDatasets.BaseVectorDataSet --+
                                 |
                                BaseCVectorDataSet

A base class for vector dataset containers implemented in C++

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
copy(self, other, patterns, deepcopy)
copy a wrapper dataset
source code
 
initializeDataMatrix(self, numPatterns, numFeatures) source code
 
addPattern(self, x, i) source code
 
addFeature(self, id, values) source code
 
addFeatures(self, other) source code
 
getPattern(self, i) source code
 
extendX(self, other, patterns) source code
 
eliminateFeatures(self, featureList)
eliminate a list of features from a dataset INPUT: featureList - a list of features to eliminate; these are numbers between 0 and numFeatures-1 (indices of features, not their IDs)
source code
 
scale(self, w)
rescale the columns of the data matrix by a weight vector w: set X[i][j] = X[i][j] * w[j]
source code
 
translate(self, c) source code
 
mean(self, patterns=None) source code
 
std(self, patterns=None) source code
 
featureCount(self, feature, patterns=None) source code
 
featureCounts(self, patterns=None) source code
 
nonzero(self, feature, patterns=None) source code
 
commonFeatures(self, pattern1, pattern2) source code
 
normalize(self, norm=2) source code

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

    Inherited from baseDatasets.WrapperDataSet
 
__len__(self)
the number of patterns in the dataset
source code
 
attachKernel(data, kernel='linear', **args) source code
 
attachLabels(self, labels) source code
 
getX(self) source code
 
get_kernel(self) source code
 
setX(self, value) source code
 
set_kernel(self, value) source code
    Inherited from baseDatasets.BaseVectorDataSet
 
__repr__(self)
repr(x)
source code
 
addFeatureKeyDict(self) source code
 
constructFromFile(self, fileName, **args) source code
 
extend(self, other, patterns=None) source code
 
featureNames2IDs(self, featureList)
convert a list of feature Names into their numeric IDs
source code
 
fromArray(self, X, **args) source code
 
fromArrayAdd(self, X) source code
 
getMatrix(self) source code
 
keepFeatures(self, features)
eliminate all but the give list of features INPUT: features - a list of features to eliminate; these are either numbers between 0 and numFeatures-1 (indices of features, not their IDs) or featureIDs
source code
 
save(self, fileName, **args)
save a dataset to a file (does not use pickle!)
source code
    Inherited from baseDatasets.BaseDataSet
 
copyConstruct(self, other, **args) 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
    Inherited from baseDatasets.WrapperDataSet
  X = property(getX, setX, None, 'X')
  isWrapper = True
  kernel = property(get_kernel, set_kernel, None, 'kernel')
    Inherited from baseDatasets.BaseVectorDataSet
  isVector = True
  verbose = 1
    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)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

copy(self, other, patterns, deepcopy)

source code 

copy a wrapper dataset

:Parameters:

  • `other` - the other dataset
  • `patternsToCopy` - a list of patterns to copy
  • `deepcopy` - a 0/1 flag telling whether to do deepcopy or not
Overrides: baseDatasets.BaseDataSet.copy