Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Comparison of possible normalization methods
This PR is related to issue #264. After our discussion, I have done some experiments in order to compare possible normalization methods for tensor decomposition and I wanted to share notebooks to be sure about the normalization method for tensorly.
In our PR #281, we suggested to normalize factors after inner iteration by using cp_normalize function for non_negative_parafac, non_negative_parafac_hals and parafac functions. As we discussed, there are different options to normalize factors and there is no exact way in the literature.
To normalize factors during inner iteration, we suggest to normalize last factor after error computation since we have used weights to compute mttkrp and removed the weights from the iprod computation. Following normalization methods are implemented to an audio data and a hyperspectral satellite image:
In addition, parafac function experiments include its own normalization.
Conclusion
In the experiments, we demonstrate weights and average of the factors to see numerical stability. Besides, we report processing time and RMSE for each experiment. Briefly, there is no significant difference between the methods. We can select one of them to update our PR and tensorly.