Make use of regress(y,x,axis) Return ydtd = y - slope*x[xtoy] - intercept
Temporary work around for numpy.ma.polyfit
Compute the principal component for data Input: numpc - number of PC to be extracted (default - 0 = ALL PC) var_dim - the dimension corresponding to the variable (default 1 - col) normalise - whether the vectors are normalised (default - True) Return: evecs (eigenvectors), evals (eigenvalues), score (projection)
Regress y with x (or x with y if reverse is True) where x is an 1D array
where x is 1D of shape (M,), y is (...,M,...) axis specifies where M is in y
Parameters: |
|
---|---|
Returns: | slope, intercept, p, corr |
where p is the p-value of the correlation. corr is the correlation coefficient