support/models.py
def corr_imp(self, w, X, y):
        '''
        Wrapper for Pearson's correlation coefficient,
        computed for the predicted response and the
        actual response.
        '''
        
        # Args:
        # w is a (d x 1) matrix taking real values.
        # X is a (k x d) matrix of n observations.
        # y is a (k x 1) matrix taking real values.

        # Output: a real-valued correlation coefficient.

        yest = np.dot(X,w)
        return scipy.stats.pearsonr(yest.flatten(), y.flatten())[0]

        Wrapper for Pearson's correlation coefficient,
        computed for the predicted response and the
        actual response.
        
Wrapper for Pearson's correlation coefficient,
computed for the predicted response and the
actual response.
Wrapper for Pearson ' s correlation coefficient computed for the predicted response and the actual response .
def corr_imp(self, w, X, y):
        yest = np.dot(X,w)
        return scipy.stats.pearsonr(yest.flatten(), y.flatten())[0]
def corr_imp ( self , w , X , y ) : yest = np . dot ( X , w ) return scipy . stats . pearsonr ( yest . flatten ( ) , y . flatten ( ) ) [ 0 ]
Wrapper for Pearson's correlation coefficient,
computed for the predicted response and the
actual response.
Wrapper for Pearson ' s correlation coefficient computed for the predicted response and the actual response .
'''
        Wrapper for Pearson's correlation coefficient,
        computed for the predicted response and the
        actual response.
        ''' # Args: # w is a (d x 1) matrix taking real values. # X is a (k x d) matrix of n observations. # y is a (k x 1) matrix taking real values. # Output: a real-valued correlation coefficient.
self
w
X
y