Skip to content

Commit

Permalink
authors, function names and exact string
Browse files Browse the repository at this point in the history
  • Loading branch information
caglayantuna committed Feb 25, 2021
1 parent 4850118 commit 761d299
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tensorly/decomposition/_nn_cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# Sam Schneider <samjohnschneider@gmail.com>
# Aaron Meurer <asmeurer@gmail.com>
# Aaron Meyer <tensorly@ameyer.me>
# Jeremy Cohen <jeremy.cohen@irisa.fr>
# Axel Marmoret <axel.marmoret@inria.fr>
# Caglayan TUna <caglayantun@gmail.com>

# License: BSD 3 clause

Expand Down Expand Up @@ -316,10 +319,12 @@ def non_negative_parafac_hals(tensor, rank, n_iter_max=100, init="svd", svd='num
sparsity_coefficients: array of float (of length the number of modes)
The sparsity coefficients on each factor.
If set to None, the algorithm is computed without sparsity
Default: [],
Default: None,
fixed_modes: array of integers (between 0 and the number of modes)
Has to be set not to update a factor, 0 and 1 for U and V respectively
Default: []
Default: None
exact: If it is True, the algorithm gives a results with high precision but it needs high computational cost. If it is False, the algorithm gives an approximate solution
Default: False
verbose: boolean
Indicates whether the algorithm prints the successive
reconstruction errors or not
Expand All @@ -328,6 +333,11 @@ def non_negative_parafac_hals(tensor, rank, n_iter_max=100, init="svd", svd='num
Indicates whether the algorithm should return all reconstruction errors
and computation time of each iteration or not
Default: False
cvg_criterion : {'abs_rec_error', 'rec_error'}, optional
Stopping criterion for ALS, works if `tol` is not None.
If 'rec_error', ALS stops at current iteration if ``(previous rec_error - current rec_error) < tol``.
If 'abs_rec_error', ALS terminates when `|previous rec_error - current rec_error| < tol`.
sparsity : float or int
Returns
-------
Expand Down Expand Up @@ -422,7 +432,7 @@ def non_negative_parafac_hals(tensor, rank, n_iter_max=100, init="svd", svd='num
return cp_tensor


class CPNN(DecompositionMixin):
class CP_NN(DecompositionMixin):
"""Non-Negative Candecomp-Parafac decomposition via Alternating-Least Square
Computes a rank-`rank` decomposition of `tensor` [1]_ such that,
Expand Down Expand Up @@ -553,7 +563,7 @@ def __repr__(self):



class CPNN_HALS(DecompositionMixin):
class CP_NN_HALS(DecompositionMixin):
"""Non-Negative Candecomp-Parafac decomposition via Alternating-Least Square
Computes a rank-`rank` decomposition of `tensor` [1]_ such that,
Expand Down
3 changes: 3 additions & 0 deletions tensorly/tenalg/proximal.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import tensorly as tl

# Author: Jean Kossaifi
# Jeremy Cohen <jeremy.cohen@irisa.fr>
# Axel Marmoret <axel.marmoret@inria.fr>
# Caglayan TUna <caglayantun@gmail.com>

# License: BSD 3 clause

Expand Down

0 comments on commit 761d299

Please sign in to comment.