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

Class VectorDataSet

source code

                object --+            
                         |            
  baseDatasets.BaseDataSet --+        
                             |        
   baseDatasets.WrapperDataSet --+    
                                 |    
                object --+       |    
                         |       |    
  baseDatasets.BaseDataSet --+   |    
                             |   |    
baseDatasets.BaseVectorDataSet --+    
                                 |    
                BaseCVectorDataSet --+
                                     |
ext.cvectordataset._object --+       |
                             |       |
    ext.cvectordataset.DataSet --+   |
                                 |   |
  ext.cvectordataset.VectorDataSet --+
                                     |
                                    VectorDataSet

Instance Methods
 
__init__(self, arg=None, **args)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
addPattern(self, x, i) source code
 
updateFeatureDict(self, arg=None) source code

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

    Inherited from BaseCVectorDataSet
 
addFeature(self, id, values) source code
 
addFeatures(self, other) source code
 
commonFeatures(self, pattern1, pattern2) source code
 
copy(self, other, patterns, deepcopy)
copy a wrapper dataset
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
 
extendX(self, other, patterns) source code
 
featureCount(self, feature, patterns=None) source code
 
featureCounts(self, patterns=None) source code
 
getPattern(self, i) source code
 
initializeDataMatrix(self, numPatterns, numFeatures) source code
 
mean(self, patterns=None) source code
 
nonzero(self, feature, patterns=None) source code
 
normalize(self, norm=2) 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
 
std(self, patterns=None) source code
 
translate(self, c) source code
    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
    Inherited from ext.cvectordataset.VectorDataSet
 
castToBase(*args) source code
 
dotProduct(*args) source code
 
duplicate(*args) source code
 
featureIDcompute(*args) source code
 
getFeature(*args) source code
 
libsvm_construct(*args) source code
 
setFeatureName(*args) source code
 
show(*args) source code
 
size(*args) source code
 
standardDeviation(*args) source code
 
weightedSum(*args) source code
    Inherited from ext.cvectordataset.DataSet
 
computeNorms(*args) source code
 
getKernelMatrixAsVector(*args) source code
 
setKernel(*args) source code
 
setY(*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'
    Inherited from ext.cvectordataset.VectorDataSet
  __del__ = lambda self:
  __getattr__ = lambda self, name:
  __swig_destroy__ = _cvectordataset.delete_VectorDataSet
  __swig_getmethods__ = {}
  __swig_setmethods__ = {}
Properties

Inherited from object: __class__

Method Details

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

source code 

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

Overrides: ext.cvectordataset.DataSet.__init__

addPattern(self, x, i)

source code 
Overrides: ext.cvectordataset.VectorDataSet.addPattern