Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • v0.2.0
  • v0.2.1
3 results

Target

Select target project
  • a23marmo/nonnegative-factorization
1 result
Select Git revision
  • master
  • v0.2.0
  • v0.2.1
3 results
Show changes
Commits on Source (2)
......@@ -22,6 +22,15 @@ For example, if you want to use nmf, type:
Don't hesitate to reach the author in case of problem. Comments are welcomed!
### Note on Python and Numpy versions
As of now, algorithms do not work with numpy versions higher than 1.24. This is an issue open on git (https://github.com/ax-le/nn-fac/issues/1), and should be fixed in the future.
For now, we only can ensure that the algorithms work with numpy version 1.23.5. Sorry for the incovenience.
Consequently, numpy 1.23.5 is only set to work with python <= 3.11. We recommand using python 3.10.4, as we ensure that the code will work with that version.
Sorry for the incovenience!
## Contents
### NNLS
This toolbox contains a NNLS resolution algorithm, developed as described in [1]. This code is based on COHEN Jeremy python code adaptation of GILLIS Nicolas MatLab code.
......
......@@ -3,6 +3,10 @@
Created on Tue Jun 11 16:52:21 2019
@author: amarmore
# TODO: An error is raised with numpy versions higher that 1.24. It is probably due to the following modification in numpy:
# "Ragged array creation will now always raise a ValueError unless dtype=object is passed. This includes very deeply nested sequences." (https://numpy.org/devdocs/release/1.24.0-notes.html)
# To debug.
"""
import numpy as np
......@@ -136,7 +140,7 @@ def ntd(tensor, ranks, init = "random", core_0 = None, factors_0 = [], n_iter_ma
-------
tensor = np.random.rand(80,100,120)
ranks = [10,20,15]
core, factors = NTD.ntd(tensor, ranks = ranks, init = "tucker", verbose = True, hals = False,
core, factors = NTD.ntd(tensor, ranks = ranks, init = "tucker", verbose = True,
sparsity_coefficients = [None, None, None, None], normalize = [True, True, False, True])
References
......
......@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="nn_fac",
version="0.3.2",
version="0.3.3",
author="Marmoret Axel",
author_email="axel.marmoret@irisa.fr",
description="Nonnegative factorization toolbox.",
......@@ -26,10 +26,9 @@ setuptools.setup(
license='BSD',
install_requires=[
'nimfa',
'numpy >= 1.18.0',
'numpy >= 1.18.0, <1.24', # Starting from version 1.24, the NTD algorithm (and potentially the others) does not work anymore. Realted to issue #1 https://github.com/ax-le/nn-fac/issues/1. Should be fixed in the future.
'scipy >= 0.13.0',
'tensorly == 0.6.0',
],
python_requires='>=3.7',
)