Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 844989a4 authored by hhakim's avatar hhakim
Browse files

Update the python script plotting sparse faust size (bytes) versus RC.

It's because of past API evolution in FaustFactory.rand().
Updated the plotting layout too.
parent 4cdc56a0
Branches
No related tags found
No related merge requests found
from pyfaust import Faust
from pyfaust import Faust, FaustFactory
import numpy as np
import os
import matplotlib.pyplot as plt
......@@ -15,8 +15,8 @@ if __name__ == '__main__':
for i, d in zip(
list(range(0, ntests)),
np.linspace(startd, endd, ntests)):
F = Faust.randFaust(nfactors,
[min_dim_sz, max_dim_sz], d)
F = FaustFactory.rand(nfactors,
[min_dim_sz, max_dim_sz], d, fac_type='sparse')
filepath = 'test_faust_size'+str(i)+'.mat'
F.save(filepath)
stat = os.stat(filepath)
......@@ -28,5 +28,6 @@ if __name__ == '__main__':
plt.xlabel('Relative Complexity/Density')
plt.ylabel('File Size (bytes)')
#plt.scatter(rcs, sizes, s=1)
plt.tight_layout()
plt.plot(rcs, sizes)
plt.show()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment