def normalizeRowSingularValues(self, normalizationMethod): self.normalizationMethod = normalizationMethod if self.normalizationMethod == 0: self.normRowMatrix = self.rowSingularValues elif self.normalizationMethod == 1: self.normRowMatrix = norm.rowProbabilityNormalization( self.rowSingularValues) elif self.normalizationMethod == 2: self.normRowMatrix = norm.columnProbabilityNormalization( self.rowSingularValues) elif self.normalizationMethod == 3: self.normRowMatrix = norm.lengthRowNormalization( self.rowSingularValues) elif self.normalizationMethod == 4: self.normRowMatrix = norm.zscoreRowsNormalization( self.rowSingularValues) elif self.normalizationMethod == 5: self.normRowMatrix = norm.zscoreColumnsNormalization( self.rowSingularValues) elif self.normalizationMethod == 11: self.normRowMatrix = norm.logRowEntropyNormalization( self.rowSingularValues) elif self.normalizationMethod == 12: self.normRowMatrix = norm.pmiNormalization(self.rowSingularValues) elif self.normalizationMethod == 13: self.normRowMatrix = norm.positivePmiNormalization( self.rowSingularValues) elif self.normalizationMethod == 14: self.normRowMatrix = norm.coalsCorrelationNormalization( self.rowSingularValues) elif self.normalizationMethod == 15: self.normRowMatrix = norm.IntegerizeNormalization( self.rowSingularValues)
def normalizeRowSingularValues(self, normalizationMethod): self.normalizationMethod = normalizationMethod if self.normalizationMethod == 0: self.normRowMatrix = self.rowSingularValues elif self.normalizationMethod == 1: self.normRowMatrix = norm.rowProbabilityNormalization(self.rowSingularValues) elif self.normalizationMethod == 2: self.normRowMatrix = norm.columnProbabilityNormalization(self.rowSingularValues) elif self.normalizationMethod == 3: self.normRowMatrix = norm.lengthRowNormalization(self.rowSingularValues) elif self.normalizationMethod == 4: self.normRowMatrix = norm.zscoreRowsNormalization(self.rowSingularValues) elif self.normalizationMethod == 5: self.normRowMatrix = norm.zscoreColumnsNormalization(self.rowSingularValues) elif self.normalizationMethod == 11: self.normRowMatrix = norm.logRowEntropyNormalization(self.rowSingularValues) elif self.normalizationMethod == 12: self.normRowMatrix = norm.pmiNormalization(self.rowSingularValues) elif self.normalizationMethod == 13: self.normRowMatrix = norm.positivePmiNormalization(self.rowSingularValues) elif self.normalizationMethod == 14: self.normRowMatrix = norm.coalsCorrelationNormalization(self.rowSingularValues) elif self.normalizationMethod == 15: self.normRowMatrix = norm.IntegerizeNormalization(self.rowSingularValues)
def normalizeTargetDocumentMatrix(self, normalizationMethod): self.normalizationMethod = normalizationMethod if self.normalizationMethod == 0: self.normalizedTargetDocumentMatrix = self.subTargetFreqs elif self.normalizationMethod == 1: self.normalizedTargetDocumentMatrix = norm.rowProbabilityNormalization( self.subTargetFreqs) elif self.normalizationMethod == 2: self.normalizedTargetDocumentMatrix = norm.columnProbabilityNormalization( self.subTargetFreqs) elif self.normalizationMethod == 3: self.normalizedTargetDocumentMatrix = norm.lengthRowNormalization( self.subTargetFreqs) elif self.normalizationMethod == 4: self.normalizedTargetDocumentMatrix = norm.zscoreRowsNormalization( self.subTargetFreqs) elif self.normalizationMethod == 5: self.normalizedTargetDocumentMatrix = norm.zscoreColumnsNormalization( self.subTargetFreqs) elif self.normalizationMethod == 11: self.normalizedTargetDocumentMatrix = norm.logRowEntropyNormalization( self.subTargetFreqs) elif self.normalizationMethod == 12: self.normalizedTargetDocumentMatrix = norm.pmiNormalization( self.subTargetFreqs) elif self.normalizationMethod == 13: self.normalizedTargetDocumentMatrix = norm.positivePmiNormalization( self.subTargetFreqs) elif self.normalizationMethod == 14: self.normalizedTargetDocumentMatrix = norm.coalsCorrelationNormalization( self.subTargetFreqs) elif self.normalizationMethod == 14: self.normalizedTargetDocumentMatrix = norm.integerizeNormalization( self.subTargetFreqs)
def normalizeTargetDocumentMatrix(self, normalizationMethod): self.normalizationMethod = normalizationMethod if self.normalizationMethod == 0: self.normalizedTargetDocumentMatrix = self.subTargetFreqs elif self.normalizationMethod == 1: self.normalizedTargetDocumentMatrix = norm.rowProbabilityNormalization(self.subTargetFreqs) elif self.normalizationMethod == 2: self.normalizedTargetDocumentMatrix = norm.columnProbabilityNormalization(self.subTargetFreqs) elif self.normalizationMethod == 3: self.normalizedTargetDocumentMatrix = norm.lengthRowNormalization(self.subTargetFreqs) elif self.normalizationMethod == 4: self.normalizedTargetDocumentMatrix = norm.zscoreRowsNormalization(self.subTargetFreqs) elif self.normalizationMethod == 5: self.normalizedTargetDocumentMatrix = norm.zscoreColumnsNormalization(self.subTargetFreqs) elif self.normalizationMethod == 11: self.normalizedTargetDocumentMatrix = norm.logRowEntropyNormalization(self.subTargetFreqs) elif self.normalizationMethod == 12: self.normalizedTargetDocumentMatrix = norm.pmiNormalization(self.subTargetFreqs) elif self.normalizationMethod == 13: self.normalizedTargetDocumentMatrix = norm.positivePmiNormalization(self.subTargetFreqs) elif self.normalizationMethod == 14: self.normalizedTargetDocumentMatrix = norm.coalsCorrelationNormalization(self.subTargetFreqs) elif self.normalizationMethod == 14: self.normalizedTargetDocumentMatrix = norm.integerizeNormalization(self.subTargetFreqs)
def normalizeRowTopicMatrix(self, normalizationMethod): print normalizationMethod self.normalizationMethod = normalizationMethod self.rowTopic_Matrix = self.rowTopic_Matrix + self.beta if normalizationMethod == 0: pass if normalizationMethod == 1: self.rowTopic_Matrix = norm.rowProbabilityNormalization( self.rowTopic_Matrix) elif normalizationMethod == 2: self.rowTopic_Matrix = norm.columnProbabilityNormalization( self.rowTopic_Matrix) elif normalizationMethod == 3: self.rowTopic_Matrix = norm.lengthRowNormalization( self.rowTopic_Matrix) elif normalizationMethod == 4: self.rowTopic_Matrix = norm.zscoreRowsNormalization( self.rowTopic_Matrix) elif normalizationMethod == 5: self.rowTopic_Matrix = norm.zscoreColumnsNormalization( self.rowTopic_Matrix) elif normalizationMethod == 11: self.rowTopic_Matrix = norm.logRowEntropyNormalization( self.rowTopic_Matrix) elif normalizationMethod == 12: self.rowTopic_Matrix = norm.pmiNormalization(self.rowTopic_Matrix) elif normalizationMethod == 13: self.rowTopic_Matrix = norm.positivePmiNormalization( self.rowTopic_Matrix) elif normalizationMethod == 14: self.rowTopic_Matrix = norm.coalsCorrelationNormalization( self.rowTopic_Matrix)
def normalizeRowTopicMatrix(self, normalizationMethod): print normalizationMethod self.normalizationMethod = normalizationMethod self.rowTopic_Matrix = self.rowTopic_Matrix + self.beta if normalizationMethod == 0: pass if normalizationMethod == 1: self.rowTopic_Matrix = norm.rowProbabilityNormalization(self.rowTopic_Matrix) elif normalizationMethod == 2: self.rowTopic_Matrix = norm.columnProbabilityNormalization(self.rowTopic_Matrix) elif normalizationMethod == 3: self.rowTopic_Matrix = norm.lengthRowNormalization(self.rowTopic_Matrix) elif normalizationMethod == 4: self.rowTopic_Matrix = norm.zscoreRowsNormalization(self.rowTopic_Matrix) elif normalizationMethod == 5: self.rowTopic_Matrix = norm.zscoreColumnsNormalization(self.rowTopic_Matrix) elif normalizationMethod == 11: self.rowTopic_Matrix = norm.logRowEntropyNormalization(self.rowTopic_Matrix) elif normalizationMethod == 12: self.rowTopic_Matrix = norm.pmiNormalization(self.rowTopic_Matrix) elif normalizationMethod == 13: self.rowTopic_Matrix = norm.positivePmiNormalization(self.rowTopic_Matrix) elif normalizationMethod == 14: self.rowTopic_Matrix = norm.coalsCorrelationNormalization(self.rowTopic_Matrix)