My environment is windows10 and install all package the project need.
Cython 0.29.20
numpy 1.19.0
scipy 1.5.1
scikit-learn 0.23.1
nose 1.3.7
I have been setup ok already ,and after successfully installing the ristretto library.
The unit tests can be run by: python setup.py test
When i run this code and show an error below:
(rnmf) C:\Users\tsai\Desktop\ristretto-master>python setup.py test
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing ristretto.egg-info\PKG-INFO
writing dependency_links to ristretto.egg-info\dependency_links.txt
writing requirements to ristretto.egg-info\requires.txt
writing top-level names to ristretto.egg-info\top_level.txt
reading manifest file 'ristretto.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.c' under directory 'ristretto'
warning: no files found matching '.pyx' under directory 'ristretto'
warning: no files found matching 'README.md'
writing manifest file 'ristretto.egg-info\SOURCES.txt'
running build_ext
C:\Users\tsai\anaconda3\envs\rnmf\lib\site-packages\sklearn\utils\deprecation.py:143: FutureWarning: The sklearn.decomposition.cdnmf_fast module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.decomposition. Anything that cannot be imported from sklearn.decomposition is now part of the private API.
warnings.warn(message, FutureWarning)
C:\Users\tsai\anaconda3\envs\rnmf\lib\site-packages\sklearn\utils\deprecation.py:143: FutureWarning: The sklearn.decomposition.nmf module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.decomposition. Anything that cannot be imported from sklearn.decomposition is now part of the private API.
warnings.warn(message, FutureWarning)
test_sketches.test_random_axis_sample ... ok
test_sketches.test_random_gaussian_map ... ok
test_sketches.test_sparse_random_map ... ok
test_transforms.test_randomized_uniform_sampling ... ok
test_transforms.test_johnson_linderstrauss ... ok
test_transforms.test_sparse_johnson_linderstrauss ... ok
test_transforms.test_fast_johnson_linderstrauss ... ok
test_utils.test_orthonormalize ... ok
test_utils.test_perform_subspace_iterations ... ok
ristretto.tests.test_cur.test_compute_cur ... C:\Users\tsai\Desktop\ristretto-master\ristretto\utils.py:12: DeprecationWarning: Converting np.complex
to a dtype is deprecated. The current result is complex128
which is not strictly correct.
if A.dtype == np.complexfloating:
ok
ristretto.tests.test_cur.test_compute_rcur ... ok
ristretto.tests.test_dmd.test_dmd ... ok
ristretto.tests.test_dmd.test_compute_rdmd ... ok
ristretto.tests.test_dmd.test_DMD ... ok
ristretto.tests.test_dmd.test_RDMD ... ok
ristretto.tests.test_eigen.test_compute_reigh_float64 ... ok
ristretto.tests.test_eigen.test_compute_reigh_complex128 ... ok
ristretto.tests.test_eigen.test_reig_nystroem_float64 ... ok
ristretto.tests.test_eigen.test_reig_nystroem_complex128 ... ok
ristretto.tests.test_eigen.test_reig_nystroem_col_float64 ... ok
ristretto.tests.test_eigen.test_reig_nystroem_col_complex128 ... ok
ristretto.tests.test_interp_decomp.test_id_col ... ok
ristretto.tests.test_interp_decomp.test_id_row ... ok
ristretto.tests.test_interp_decomp.test_rid_col ... ok
ristretto.tests.test_interp_decomp.test_rid_row ... ok
ristretto.tests.test_lu.test_compute_rlu_float64 ... ok
ristretto.tests.test_lu.test_compute_rlu_complex128 ... ok
ristretto.tests.test_nmf.test_nmf_fhals ... ERROR
ristretto.tests.test_nmf.test_rnmf_fhals ... ERROR
ristretto.tests.test_pca.test_spca ... ok
ristretto.tests.test_pca.test_robspca ... ok
ristretto.tests.test_pca.test_rspca ... ok
ristretto.tests.test_qb.test_rqb_float64 ... ok
ristretto.tests.test_qb.test_rqb_complex128 ... ok
ristretto.tests.test_qb.test_rqb_block_float64 ... ok
ristretto.tests.test_qb.test_rqb_block_wide_float64 ... ok
ristretto.tests.test_qb.test_rqb_block_complex128 ... ok
ristretto.tests.test_qb.test_rqb_block_wide_complex128 ... ok
ristretto.tests.test_svd.test_compute_rsvd_float64 ... ok
ristretto.tests.test_svd.test_compute_rsvd_complex128 ... ok
======================================================================
ERROR: ristretto.tests.test_nmf.test_nmf_fhals
Traceback (most recent call last):
File "C:\Users\tsai\anaconda3\envs\rnmf\lib\site-packages\nose\case.py", line 198, in runTest
self.test(*self.arg)
File "C:\Users\tsai\Desktop\ristretto-master\ristretto\tests\test_nmf.py", line 15, in test_nmf_fhals
W, H = compute_nmf(Anoisy, rank=10)
File "C:\Users\tsai\Desktop\ristretto-master\ristretto\nmf.py", line 154, in compute_nmf
violation = _update_cdnmf_fast(Ht, WtW, AtW, permutation)
File "sklearn\decomposition_cdnmf_fast.pyx", line 13, in sklearn.decomposition._cdnmf_fast._update_cdnmf_fast
ValueError: Buffer dtype mismatch, expected 'Py_ssize_t' but got 'long'
======================================================================
ERROR: ristretto.tests.test_nmf.test_rnmf_fhals
Traceback (most recent call last):
File "C:\Users\tsai\anaconda3\envs\rnmf\lib\site-packages\nose\case.py", line 198, in runTest
self.test(*self.arg)
File "C:\Users\tsai\Desktop\ristretto-master\ristretto\tests\test_nmf.py", line 26, in test_rnmf_fhals
W, H = compute_rnmf(Anoisy, rank=10)
File "C:\Users\tsai\Desktop\ristretto-master\ristretto\nmf.py", line 335, in compute_rnmf
violation = _update_cdnmf_fast(Ht, WtW, BtW, permutation)
File "sklearn\decomposition_cdnmf_fast.pyx", line 13, in sklearn.decomposition._cdnmf_fast._update_cdnmf_fast
ValueError: Buffer dtype mismatch, expected 'Py_ssize_t' but got 'long'
Ran 40 tests in 0.850s
FAILED (errors=2)
Test failed: <unittest.runner.TextTestResult run=40 errors=2 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=40 errors=2 failures=0>