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
f63d27b9
Commit
f63d27b9
authored
7 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Add a faust test script showing how the .mat file size is related to RCG.
parent
79230b49
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
misc/test/src/Python/test_sparse_faust_size_vs_rcg.py
+33
-0
33 additions, 0 deletions
misc/test/src/Python/test_sparse_faust_size_vs_rcg.py
with
33 additions
and
0 deletions
misc/test/src/Python/test_sparse_faust_size_vs_rcg.py
0 → 100644
+
33
−
0
View file @
f63d27b9
from
FaustPy
import
RandFaustType
,
Faust
import
numpy
as
np
import
os
import
matplotlib.pyplot
as
plt
if
__name__
==
'
__main__
'
:
nfactors
=
3
startd
=
0.01
endd
=
1
min_dim_sz
=
1000
max_dim_sz
=
1000
sizes
=
[]
rcgs
=
[]
ntests
=
100
for
i
,
d
in
zip
(
list
(
range
(
0
,
ntests
)),
np
.
linspace
(
startd
,
endd
,
ntests
)):
F
=
Faust
.
randFaust
(
RandFaustType
.
SPARSE
,
RandFaustType
.
REAL
,
nfactors
,
nfactors
,
min_dim_sz
,
max_dim_sz
,
d
)
filepath
=
'
test_faust_size
'
+
str
(
i
)
+
'
.mat
'
F
.
save
(
filepath
)
stat
=
os
.
stat
(
filepath
)
sizes
.
append
(
stat
.
st_size
)
rcgs
.
append
(
F
.
RCG
())
os
.
remove
(
filepath
)
plt
.
title
(
'
File Size vs RCG for Pure-Sparse Fausts
\n
(
'
+
str
(
nfactors
)
+
'
'
'
random factors
'
+
str
(
min_dim_sz
)
+
'
x
'
+
str
(
max_dim_sz
)
+
'
)
'
)
plt
.
xlabel
(
'
Relative Complexity Gain (RCG)
'
)
plt
.
ylabel
(
'
File Size (bytes)
'
)
#plt.scatter(rcgs, sizes, s=1)
plt
.
plot
(
rcgs
,
sizes
)
plt
.
show
()
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