Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo in bench_methods_run.py #82

Open
dinalzein opened this issue Mar 29, 2022 · 5 comments
Open

typo in bench_methods_run.py #82

dinalzein opened this issue Mar 29, 2022 · 5 comments

Comments

@dinalzein
Copy link
Contributor

dinalzein commented Mar 29, 2022

There is a typo in bench_methods_run.py for methods: run_fista and run_l_bfgs.

In method run_fista :

pobj, times, d_hat, z_hat = learn_d_z(X, n_atoms, n_times_atom, func_d=update_d_block, reg=reg, n_iter=n_iter, random_state=random_state, n_jobs=1, solver_z='fista', solver_z_kwargs=dict(max_iter=2), ds_init=ds_init, verbose=verbose)

should be replaced by:

pobj, times, d_hat, z_hat, reg = learn_d_z(X, n_atoms, n_times_atom, func_d=update_d_block, reg=reg, n_iter=n_iter, random_state=random_state, n_jobs=1, solver_z='fista', solver_z_kwargs=dict(max_iter=2), ds_init=ds_init, verbose=verbose)

same modification can be applied to run_l_bfgs

@agramfort
Copy link
Collaborator

@dinalzein can you send a PR?

@dinalzein
Copy link
Contributor Author

yes.

@dinalzein
Copy link
Contributor Author

dinalzein commented Mar 29, 2022

Also, for run_multichannel_gcd_fullrank function in this same class bench_methods_run.py, the uv_constraint='separate' parameter for the called method learn_d_z_multi should be replaced by uv_constraint='auto' because rank1=False.
Do I fix them together in one PR?

@agramfort
Copy link
Collaborator

agramfort commented Mar 29, 2022 via email

@dinalzein
Copy link
Contributor Author

dinalzein commented Mar 29, 2022

Done.

in the same class bench_methods_run.py, the following can be added:

isExist = os.path.exists('figures')
 if not isExist:
   os.makedirs('figures')

just before the last two lines in the main function to avoid file doesn't exist error (I didn't include it in the PR, but I can do another one).

I got an error inn bench_methods_plot.py, for the plot_barplot function,

and replacing
rect = ax.bar(left=x_positions + i * width, height=np.array(this_df['mean']), width=width, label=label, hatch=hatch, color=colors[i])

by:

rect = ax.bar(x_positions + i * width, height=np.array(this_df['mean']), width=width, label=label, hatch=hatch, color=colors[i])

worked fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants