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
Admin message
GitLab upgrade completed. Current version is 17.11.4.
Show more breadcrumbs
faust group
faust
Commits
ba9dbed8
Commit
ba9dbed8
authored
6 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Add pyfaust.FaustFactory.svdtj().
parent
59bc398a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wrapper/python/pyfaust.py
+18
-0
18 additions, 0 deletions
wrapper/python/pyfaust.py
with
18 additions
and
0 deletions
wrapper/python/pyfaust.py
+
18
−
0
View file @
ba9dbed8
...
...
@@ -1903,6 +1903,24 @@ class FaustFactory:
ret_list
+=
[
p
]
return
ret_list
@staticmethod
def
svdtj
(
M
,
J
,
t
=
1
):
from
scipy.sparse
import
spdiags
from
scipy
import
diag
from
pyfaust
import
Faust
from
numpy
import
argsort
,
sign
,
eye
W1
,
D1
=
FaustFactory
.
eigtj
(
M
@M.T
,
J
,
t
)
W2
,
D2
=
FaustFactory
.
eigtj
(
M
.
T
@M
,
J
,
t
)
S
=
diag
(
W1
.
T
*
M
*
W2
.
todense
())
I
=
argsort
(
abs
(
S
))[::
-
1
]
sign_S
=
spdiags
(
sign
(
S
[
I
]),
[
0
],
S
.
shape
[
0
],
S
.
shape
[
0
])
S
=
spdiags
(
S
[
I
],
[
0
],
S
.
shape
[
0
],
S
.
shape
[
0
])
S
*=
sign_S
Id
=
eye
(
S
.
shape
[
0
])
U
=
W1
*
Faust
([
Id
[:,
I
],
sign_S
.
toarray
()])
V
=
W2
*
Faust
(
Id
[:,
I
])
return
U
,
S
,
V
@staticmethod
def
eigtj
(
M
,
J
,
t
=
1
,
verbosity
=
0
):
"""
...
...
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