|
|
|
|
|
|
|
copy(self,
other,
patternsToCopy,
deepcopy)
copy the X variable of a sparse dataset
INPUT:
other - the other dataset
patternsToCopy - a list of patterns to copy
deepcopy - a 0/1 flag telling whether to do deepcopy or not |
source code
|
|
|
initializeDataMatrix(self,
numPatterns,
numFeatures) |
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
|
|
|
featureView(self)
F is a list where F[i] is a dictionary whose entries are the non
zero entries of feature number i:
F[self.featureKeyDict[f]][i] = X[i][f] |
source code
|
|
|
|
|
|
|
|
|
normalize(self,
p=1)
normalize dataset according to the p-norm, p=1,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]
w is either a dictionary or an array |
source code
|
|
|
|
|
|
|
|
|
|
|
|