Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 34becc6b authored by hhakim's avatar hhakim
Browse files

Add a note in svdtj doc about error calulation two-times strategy.

parent 02011e28
No related branches found
No related tags found
No related merge requests found
Pipeline #834151 skipped
......@@ -38,6 +38,21 @@
%> some factors but increases slightly the computational cost because the error
%> is computed more often).
%>
%>
%> \note In order to speed up the error computation of the approximate Faust, the
%> algorithm follows a two-times strategy:
%> 1. In the first iterations a rough error but less costly error is computed \f$\| M \|^2_F - \| S \|^2_F\f$
%> 2. In the latest iterations the precise error (relative or absolute) indicated above
%> (see relerr argument) is computed to reach the targeted accuracy. Don't forget that
%> the err_period argument determines the frequency at which the error is
%> calculated, you might decrease its value in order to obtain an error closer to
%> what you asked. In last resort you can disable the two-times strategy by
%> setting the environment related variable like this (defaulty the value is '0', which means
%> that the two-times strategy is used).
%> @code
%> setenv('SVDTJ_ALL_TRUE_ERR', '1')
%> @endcode
%>
%> @retval [U,S,V]: such that U*S*V' is the approximate of M with:
%> - S: (sparse real diagonal matrix) the singular values in descending order.
%> - U, V: (Faust objects) orthonormal transforms.
......
......@@ -139,6 +139,20 @@ def svdtj(M, nGivens=None, tol=0, err_period=100, relerr=True,
i.e. tU = M.shape[0] / 2, tV = M.shape[1] / 2.
enable_large_Faust: see eigtj.
NOTE: In order to speed up the error computation of the approximate Faust, the
algorithm follows a two-times strategy:
1. In the first iterations a rough error but less costly error is computed \f$\| M \|^2_F - \| S \|^2_F\f$
2. In the latest iterations the precise error (relative or absolute) indicated above
(see relerr argument) is computed to reach the targeted accuracy. Don't forget that
the err_period argument determines the frequency at which the error is
calculated, you might decrease its value in order to obtain an error closer to
what you asked. In last resort you can disable the two-times strategy by
setting the environment related variable like this (defaulty the value is '0', which means
that the two-times strategy is used).
<code>
os.environ['SVDTJ_ALL_TRUE_ERR'] = '1'
</code>
Returns:
The tuple U,S,V: such that U*numpy.diag(S)*V.H is the approximate of M.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment