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

Problem in compute_dataset_statistics #678

Open
toncho11 opened this issue Jan 17, 2025 · 1 comment
Open

Problem in compute_dataset_statistics #678

toncho11 opened this issue Jan 17, 2025 · 1 comment

Comments

@toncho11
Copy link
Contributor

toncho11 commented Jan 17, 2025

I am getting the error below when uisng the benchmark. It seems the error is in: compute_dataset_statistics()

Zhou2016-WithinSession: 100%|██████████| 4/4 [00:46<00:00, 11.55s/it]
Traceback (most recent call last):

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File c:\work\pythoncode\ml_examples\eeg\mdm-mf\article_comparison_default_metric_vs_power_metric_moabb.py:65
    results = benchmark(

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\moabb\benchmark.py:225 in benchmark
    _save_results(eval_results, output, plot)

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\moabb\benchmark.py:302 in _save_results
    analyze(prdgm_result, str(prdgm_path), plot=plot)

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\moabb\analysis\__init__.py:61 in analyze
    stats = compute_dataset_statistics(results)

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\moabb\analysis\meta_analysis.py:237 in compute_dataset_statistics
    p = compute_pvals_wilcoxon(score_data, algs)

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\moabb\analysis\meta_analysis.py:66 in compute_pvals_wilcoxon
    p = stats.wilcoxon(df.loc[:, pipe1], df.loc[:, pipe2])[1]

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\scipy\_lib\_util.py:798 in wrapper
    return fun(*args, **kwargs)

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\scipy\stats\_axis_nan_policy.py:573 in axis_nan_policy_wrapper
    res = hypotest_fun_out(*samples, **kwds)

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\scipy\stats\_morestats.py:4129 in wilcoxon
    return _wilcoxon._wilcoxon_nd(x, y, zero_method, correction, alternative,

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\scipy\stats\_wilcoxon.py:199 in _wilcoxon_nd
    temp = _wilcoxon_iv(x, y, zero_method, correction, alternative, method, axis)

  File C:\Work\PythonCode\envs\eeg3_p310\lib\site-packages\scipy\stats\_wilcoxon.py:125 in _wilcoxon_iv
    raise ValueError("zero_method 'wilcox' and 'pratt' do not "

ValueError: zero_method 'wilcox' and 'pratt' do not work if x - y is zero for all elements.
@sylvchev
Copy link
Member

I could not reproduce this. Is this an error from the results agregation?

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