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

Error with posthoc_conover_friedman #76

Closed
mlpotter opened this issue Nov 25, 2024 · 5 comments
Closed

Error with posthoc_conover_friedman #76

mlpotter opened this issue Nov 25, 2024 · 5 comments
Assignees
Labels

Comments

@mlpotter
Copy link

Describe the bug
Similar to closed issue #19 , I am getting NaN's in the posthoc_conover_friedman test on all off-diagonal elements of the returned DataFrame.

sp.posthoc_conover_friedman(mse_df,p_adjust ="fdr_bh")

None of my values in the passed in the mse_df dataframe are NaN, nor negative.

The columns of the mse_df are the machine learning models, the rows are the different datasets, and the values are a distance metric.

Expected behavior
A clear and concise description of what you expected to happen.

System and package information (please complete the following information):

  • OS: Rocky Linux (Green Obsidian)
  • Package version: 0.10.0

I am using scikit-posthoc version 0.10.0

@maximtrp
Copy link
Owner

maximtrp commented Nov 25, 2024

@mlpotter Thank you for reporting! Can I have a look at a reproducible example (code + dataset)? If not, could you help me debug it by extracting a function implementing this test and printing out strange results on each step?

@mlpotter
Copy link
Author

I am attaching a csv file with the dataframe, and minimal code to load in the dataframe and pass it to the posthoc_conover_friedman test. Please let me know if this works.

import pandas as pd
import scikit_posthocs as sp
test_df = pd.read_csv('test.csv',index_col=0).applymap(float)

print(test_df.head())
print(sp.posthoc_conover_friedman(test_df,p_adjust ="fdr_bh"))

test.csv

@maximtrp
Copy link
Owner

maximtrp commented Nov 27, 2024

@mlpotter Thank you! Attempted to fix it in the recent commit. Do you mind me adding this data to the package tests?

@maximtrp
Copy link
Owner

The new version is released. Could you please try it?

@mlpotter
Copy link
Author

Thank you! Attempted to fix it in the recent commit. Do you mind me adding this data to the package tests?

You may add the data to the package tests!

The new version is released. Could you please try it?

I will try it this upcoming Monday! Thank you!

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

No branches or pull requests

2 participants