Skip to content

Return SignedRankTest objects, allow to use the built-in plot() methods in baycomp#20

Merged
sherbold merged 5 commits into
sherbold:masterfrom
Daniel300000:master
Jul 21, 2023
Merged

Return SignedRankTest objects, allow to use the built-in plot() methods in baycomp#20
sherbold merged 5 commits into
sherbold:masterfrom
Daniel300000:master

Conversation

@Daniel300000
Copy link
Copy Markdown
Contributor

I added another attribute 'sample_matrix' for the SignedRankTest objects from the package 'baycomp'.

One can then use them to draw some plots, e.g.:

# do Bayesian testing with autorank
result_bayesian = autorank(data, alpha=0.05, verbose=False, approach='bayesian')

# plot the simplex with baycomp
fig = result_bayesian.sample_matrix.loc['Sample1', 'Sample2'].plot(names=('Sample1', 'Sample2'))

@sherbold
Copy link
Copy Markdown
Owner

Thanks for this contribution @Daniel300000!

Great idea to expose this.

The change itself looks good. However, before accepting two things need to be done:

  • The change breaks the test case test_plot_stats_invalid because the number of fields in RankResult changed. This is easily fixed with another None.
  • The additional parameter needs to be documented in the docstring of the autorank method.

@sherbold sherbold merged commit d7ce337 into sherbold:master Jul 21, 2023
@Daniel300000
Copy link
Copy Markdown
Contributor Author

Thanks for merging the pull request!

It seems that I was a little bit too fast with my commit, sorry. Should we also update the description? For example:

    sample_matrix (DataFrame):
        Matrix with SignedRankTest objects from package baycomp. Can be used to do further analysis, e.g. to generate
        plots using the built-in plot() method of baycomp. For a detailed description of methods and parameters, see
        the documentation of baycomp.
        _(New in Version 1.2.0)_

What would be the new version on PyPI? Version 1.2.0?

@sherbold
Copy link
Copy Markdown
Owner

Yes, next will be 1.2.0. If you want to update the documentation, add a link directly to the relevant part of baycomp.

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

Successfully merging this pull request may close these issues.

2 participants