sklearn_utils/noise/noise_preprocessing.py
def relative_noise_size(self, data, noise):
        '''
        :data: original data as numpy matrix
        :noise: noise matrix as numpy matrix
        '''
        return np.mean([
            sci_dist.cosine(u / la.norm(u), v / la.norm(v))
            for u, v in zip(noise, data)
        ])
def relative_noise_size(self, data, noise):
        '''
        :data: original data as numpy matrix
        :noise: noise matrix as numpy matrix
        '''
        return np.mean([
            sci_dist.cosine(u / la.norm(u), v / la.norm(v))
            for u, v in zip(noise, data)
        ])
def relative_noise_size ( self , data , noise ) : return np . mean ( [ sci_dist . cosine ( u / la . norm ( u ) , v / la . norm ( v ) ) for u , v in zip ( noise , data ) ] )
:data: original data as numpy matrix
        :noise: noise matrix as numpy matrix
: data : original data as numpy matrix : noise : noise matrix as numpy matrix