src/mf_algorithms/mf.py
def weightsample(self, F, mode, **kwargs):
    
        '''
        computes the probability vector for a matrix mode for weighted sampling
        
        Parameters:
        ---------------
        F:      matrix from which we want to weight sample 
        mode:   either 1 or 0 (1 representing row and 0 representing column)
        '''
        
        prob = np.linalg.norm(F, axis = mode)
        return (prob / np.sum(prob))

        computes the probability vector for a matrix mode for weighted sampling
        
        Parameters:
        ---------------
        F:      matrix from which we want to weight sample 
        mode:   either 1 or 0 (1 representing row and 0 representing column)
        
computes the probability vector for a matrix mode for weighted sampling
Parameters.

matrix from which we want to weight sample
mode:   either 1 or 0 (1 representing row and 0 representing column)
computes the probability vector for a matrix mode for weighted sampling Parameters . matrix from which we want to weight sample mode : either 1 or 0 ( 1 representing row and 0 representing column )
def weightsample(self, F, mode, **kwargs):
        prob = np.linalg.norm(F, axis = mode)
        return (prob / np.sum(prob))
def weightsample ( self , F , mode , ** kwargs ) : prob = np . linalg . norm ( F , axis = mode ) return ( prob / np . sum ( prob ) )
computes the probability vector for a matrix mode for weighted sampling
Parameters:
computes the probability vector for a matrix mode for weighted sampling Parameters :
'''
        computes the probability vector for a matrix mode for weighted sampling
        
        Parameters:
        ---------------
        F:      matrix from which we want to weight sample 
        mode:   either 1 or 0 (1 representing row and 0 representing column)
        '''
self
F
mode