sbailey / empca

Principal Component Analysis (PCA) for Missing and/or Noisy Data
Other
77 stars 23 forks source link

warning when using weights #4

Open londumas opened 5 years ago

londumas commented 5 years ago

I get the following warning when using weights, I bet it can simply be corrected:

<me>/Programs/sbailey/empca/empca.py:256: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  x = np.linalg.lstsq(A, b)[0]

Here is a minimal example of code:

import scipy as sp
import empca

flux = sp.loadtxt('exemple_flux.txt')
weights = sp.loadtxt('exemple_weight.txt')
model = empca.empca(flux, niter=1, nvec=1, weights=weights)

exemple_flux.txt exemple_weight.txt