Coder Social home page Coder Social logo

Implementing New Tests about statannotations HOT 3 CLOSED

trevismd avatar trevismd commented on August 20, 2024
Implementing New Tests

from statannotations.

Comments (3)

trevismd avatar trevismd commented on August 20, 2024 1

Thank you, @tathey1 !

from statannotations.

trevismd avatar trevismd commented on August 20, 2024

Hello @tathey1 ,

Your question could be about two different things, so I'll give short reply for each case. Please don't hesitate to specify further to continue the discussion.

  1. You implemented a function and want to use it in your plots. In this case, with the function say test_function written (in any file you want, or from another library, provided it has the correct API, you can create a myStatTest = StatTest(test_function, ...) object with it, as we do for Wilcoxon on:

    'Wilcoxon-legacy': StatTest(wilcoxon,
    'Wilcoxon test (paired samples)', 'Wilcoxon'),

    Then, you simply use annotator.configure(test=myStatTest) to apply it. This doesn't require modifying the package's files.
    Example with an external library function in a gist https://gist.github.com/trevismd/f556d83f6efdad249f995eb65daeb1d9.
    This is explained in the code comments, and in some previous discussions, but it could have a spot on the README or usage notebook, and this contribution to the documentation would be very welcome! (as well as any other hole in the doc one wishes to fill).

  2. You would like to share this method and make it part of statannotations.
    In this case, your understanding of the package's structure is correct and we should continue the discussion on the appropriateness of the change, because at some point I was wondering if an independent repository shouldn't exist for this kind of "extension".

from statannotations.

tathey1 avatar tathey1 commented on August 20, 2024

Thanks for the response! My question was related to 1 - implementing my own test for myself. I didn't put two and two together and realize that I could feed in my own StatTest object to Annotator.configure. Now I have it working in the way you suggested.

I made a PR with both an addition to the notebook, and updates to the docs in case you want to proceed. For what it's worth the test I was adding is simply a log transform followed by a t-test (which is what I used in the example in the PR). Seems trivial to add to the core set of tests, but of course happy to do so if you like.

from statannotations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.