Git Product home page Git Product logo

Comments (3)

raphaelvallat avatar raphaelvallat commented on August 24, 2024 1

Hi @hoechenberger! Thanks for pointing this. I agree that we should think of a native implementation of the multi-index. This will probably require a lot of adaptations to the code. I am gonna be very busy in the next weeks so let's stick with your workaround for now and I'll try to add the multi-index support in future releases. Thanks!

from pingouin.

hoechenberger avatar hoechenberger commented on August 24, 2024

My current workaround:

In[3]: corr_result = pingouin.pairwise_corr(data['Result'], columns=['a', 'b'])
  ...: print(corr_result)
  ...: 
/Users/hoechenberger/miniconda3/envs/QUOTE/lib/python3.7/site-packages/pingouin/effsize.py:135: RuntimeWarning: divide by zero encountered in arctanh
  z = np.arctanh(stat)
/Users/hoechenberger/miniconda3/envs/QUOTE/lib/python3.7/site-packages/pingouin/power.py:618: RuntimeWarning: divide by zero encountered in arctanh
  zr = np.arctanh(r) + r / (2 * (n - 1))
/Users/hoechenberger/miniconda3/envs/QUOTE/lib/python3.7/site-packages/scipy/integrate/quadpack.py:385: IntegrationWarning: The integral is probably divergent, or slowly convergent.
  warnings.warn(msg, IntegrationWarning)
/Users/hoechenberger/miniconda3/envs/QUOTE/lib/python3.7/site-packages/pingouin/pairwise.py:854: RuntimeWarning: divide by zero encountered in arctanh
  stats['z'] = np.arctanh(stats['r'].values)
   X  Y   method       tail  n  ...    adj_r2    z  p-unc   BF10  power
0  a  b  pearson  two-sided  5  ...       1.0  inf    0.0 -8.554    1.0

[1 rows x 13 columns]

from pingouin.

raphaelvallat avatar raphaelvallat commented on August 24, 2024

Hi @hoechenberger!
I've just added suport for multi-index columns in the pingouin.pairwise_corr function (commit 94da5e6).

This will be hopefully included in the next release. If by any chance you can give it a try on "real-data" before and report any bugs that would be greatly appreciated. Some examples are shown in the Jupyter notebook https://github.com/raphaelvallat/pingouin/blob/94da5e6495ba9218362da409e09f65c0714904bd/notebooks/04_Correlations.ipynb

Thanks!
Raphael

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.