Git Product home page Git Product logo

Comments (8)

arthurpaulino avatar arthurpaulino commented on July 22, 2024 1

Hello @raphaelvallat,

Sure, I'm working on it. While researching, I think I found how the extra metrics could be explicit on the results.

The test can be performed with a few different values for lambda_, as seen here. And for each value of lambda_, there should be a different pair of χ² and p-value.

Wrapping it up, pg.chi2 could return tests for each lambda_ (not just for the Pearson's) as well as the degree of freedom and the contingency table with expected frequencies.

I'll be back soon with the Jupyter Notebook.

from pingouin.

arthurpaulino avatar arthurpaulino commented on July 22, 2024 1

Btw if you prefer to work on a PR of your own, please feel free to fork the develop branch and submit it when you're done ;-)

That'd be great. I'm just a bit busy lately, but I'm eager to participate and help :D

from pingouin.

arthurpaulino avatar arthurpaulino commented on July 22, 2024 1

Working on it and learning a lot! (arthurpaulino@41f176f)

I'll implement the tests tomorrow. Any feedback is welcome 😃

from pingouin.

raphaelvallat avatar raphaelvallat commented on July 22, 2024 1

This looks absolutely great @arthurpaulino ! Amazing job, can't wait to try it out!

from pingouin.

raphaelvallat avatar raphaelvallat commented on July 22, 2024 1

PS: you also need to add the datasets to the MANIFEST.in file, otherwise the example dataset will not be installed with pip!

Thanks!

from pingouin.

raphaelvallat avatar raphaelvallat commented on July 22, 2024

Hi @arthurpaulino!

Thank you for your message! I don't use this test very often, but I'd be happy to implement it in the next release (or more realistically the one after the next). It would be very helpful if you could share a Jupyter Notebook showing how you would typically do this test using Pandas + SciPy, as well as the kind of metrics / information that you would be interested in having as an output of the pg.pearson_chi2 function.

Best,
Raphael

from pingouin.

arthurpaulino avatar arthurpaulino commented on July 22, 2024

Alright, that took a while. It was a good learning experience for me.

I tried to keep the example as minimal and organized as possible. The result is somewhat close to a final version of what gp.chi2 would look like. The notebook link is here.

It was inspired by SciPy's implementation, which is more robust and incorporates a few more checks that would be healthy in the final version of gp.chi2, I think.

from pingouin.

raphaelvallat avatar raphaelvallat commented on July 22, 2024

Thank you @arthurpaulino, this looks great! I'm gonna look at that more in details this weekend, and hopefully should be able to include it in the next release or so then. (Btw if you prefer to work on a PR of your own, please feel free to fork the develop branch and submit it when you're done ;-))
Thanks!

from pingouin.

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.