Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
faust group
faust
Commits
34becc6b
Commit
34becc6b
authored
2 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
wrapper/matlab/+matfaust/+fact/svdtj.m
+15
-0
15 additions, 0 deletions
wrapper/matlab/+matfaust/+fact/svdtj.m
wrapper/python/pyfaust/fact.py
+14
-0
14 additions, 0 deletions
wrapper/python/pyfaust/fact.py
with
29 additions
and
0 deletions
wrapper/matlab/+matfaust/+fact/svdtj.m
+
15
−
0
View file @
34becc6b
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
wrapper/python/pyfaust/fact.py
+
14
−
0
View file @
34becc6b
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment