ranking/cosine_similarity.py
def _reduce_dim(self, T, X): 
        """
        Use decomposition method to reduce dimension of the two vectors T and X.
        Concatenate T and X before running NMF.
        """
        TX = np.concatenate((T, X), axis=0)
        print "Transforming"
        transformed_X = self.model.fit_transform(TX)
        print "Done transform"
        split = T.shape[0]
        new_T, _, new_X = np.vsplit(transformed_X, (split, split))
        return new_T, new_X

        Use decomposition method to reduce dimension of the two vectors T and X.
        Concatenate T and X before running NMF.
        
Use decomposition method to reduce dimension of the two vectors T and X.
Concatenate T and X before running NMF.
Use decomposition method to reduce dimension of the two vectors T and X . Concatenate T and X before running NMF .
def _reduce_dim(self, T, X): 
        TX = np.concatenate((T, X), axis=0)
        print "Transforming"
        transformed_X = self.model.fit_transform(TX)
        print "Done transform"
        split = T.shape[0]
        new_T, _, new_X = np.vsplit(transformed_X, (split, split))
        return new_T, new_X
def _reduce_dim ( self , T , X ) : TX = np . concatenate ( ( T , X ) , axis = 0 ) print "Transforming" transformed_X = self . model . fit_transform ( TX ) print "Done transform" split = T . shape [ 0 ] new_T , _ , new_X = np . vsplit ( transformed_X , ( split , split ) ) return new_T , new_X
Use decomposition method to reduce dimension of the two vectors T and X.
Concatenate T and X before running NMF.
Use decomposition method to reduce dimension of the two vectors T and X . Concatenate T and X before running NMF .
"""
        Use decomposition method to reduce dimension of the two vectors T and X.
        Concatenate T and X before running NMF.
        """
self
T
X