PHATE icon indicating copy to clipboard operation
PHATE copied to clipboard

SVD computation error message

Open ivan-marroquin opened this issue 4 years ago • 0 comments

Describe the bug With my input data, I get a SVD error computation about "array must not contain infs or NaNs" when I do fit_transform to reduce dimensionality of input data. Note that problem occurs whether I use mds= "classic" or "nonmetric".

I attached a copy of the input data

Thanks for your help,

Ivan

To Reproduce Please refer to attached zip file, in there you will find Python script and input data

Expected behavior Be able to reduce dimensionality of input data

Actual behavior projected_data= embedding.fit_transform(X= input_data) File "C:\Temp\Python\Python3.6.5\lib\site-packages\phate\phate.py", line 961, in fit_transform self.fit(X) File "C:\Temp\Python\Python3.6.5\lib\site-packages\phate\phate.py", line 857, in fit self.diff_op File "C:\Temp\Python\Python3.6.5\lib\site-packages\phate\phate.py", line 281, in diff_op diff_op = self.graph.landmark_op File "C:\Temp\Python\Python3.6.5\lib\site-packages\graphtools\graphs.py", line 593, in landmark_op self.build_landmark_op() File "C:\Temp\Python\Python3.6.5\lib\site-packages\graphtools\graphs.py", line 663, in build_landmark_op random_state=self.random_state, File "C:\Temp\Python\Python3.6.5\lib\site-packages\sklearn\utils\extmath.py", line 340, in randomized_svd Uhat, s, V = linalg.svd(B, full_matrices=False) File "C:\Temp\Python\Python3.6.5\lib\site-packages\scipy\linalg\decomp_svd.py", line 106, in svd a1 = _asarray_validated(a, check_finite=check_finite) File "C:\Temp\Python\Python3.6.5\lib\site-packages\scipy_lib_util.py", line 272, in _asarray_validated a = toarray(a) File "C:\Temp\Python\Python3.6.5\lib\site-packages\numpy\lib\function_base.py", line 486, in asarray_chkfinite "array must not contain infs or NaNs") ValueError: array must not contain infs or NaNs

System information:

Output of phate.__version__:

Please run phate.__version__ and paste the results here.

You can do this with `python -c 'import phate; print(phate.__version__)'`
phate-1.0.7

Output of pd.show_versions():

Please run pd.show_versions() and paste the results here.

You can do this with `python -c 'import pandas as pd; pd.show_versions()'`

INSTALLED VERSIONS

commit : None python : 3.6.5.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 63 Stepping 2, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None

pandas : 0.25.0 numpy : 1.19.5 pytz : 2018.5 dateutil : 2.7.3 pip : 9.0.3 setuptools : 41.0.1 Cython : 0.29.14 pytest : 6.0.1 hypothesis : None sphinx : 2.3.1 blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : 0.9999999 pymysql : None psycopg2 : None jinja2 : 2.11.0 IPython : 7.11.1 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.2.2 numexpr : 2.7.3 odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None s3fs : None scipy : 1.5.4 sqlalchemy : None tables : 3.6.1 xarray : None xlrd : 1.2.0 xlwt : None xlsxwriter : None

Additional context Python 3.6.5 with Deprecated-1.2.12 graphtools-1.5.2 phate-1.0.7 pygsp-0.5.1 s-gd2-1.8 scprep-1.1.0 tasklogger-1.1.0

issue_phate.zip

ivan-marroquin avatar Jun 10 '21 15:06 ivan-marroquin