(self, X)
return P / np.resize(P.sum(axis=1), P.T.shape).T
Probabilty could be computed from the correlation coefficient
Probabilty could be computed from the correlation coefficient
Probabilty could be computed from the correlation coefficient
def predict_proba(self, X):
        """Probabilty could be computed from the correlation coefficient"""
        P = np.zeros(shape=(len(X), len(self.freqs)))
        for i, x in enumerate(X):
            for j, f in enumerate(self.freqs):
                if f.replace(".", "", 1).isnumeric():
                    S_x, S_y = self.cca.fit_transform(x.T, self.Yf[f].T)
                    P[i, j] = np.corrcoef(S_x.T, S_y.T)[0, 1]
        return P / np.resize(P.sum(axis=1), P.T.shape).T
def predict_proba ( self , X ) : P = np . zeros ( shape = ( len ( X ) , len ( self . freqs ) ) ) for i , x in enumerate ( X ) : for j , f in enumerate ( self . freqs ) : if f . replace ( "." , "" , 1 ) . isnumeric ( ) : S_x , S_y = self . cca . fit_transform ( x . T , self . Yf [ f ] . T ) P [ i , j ] = np . corrcoef ( S_x . T , S_y . T ) [ 0 , 1 ] return P / np . resize ( P . sum ( axis = 1 ) , P . T . shape ) . T