Skip to content

Instantly share code, notes, and snippets.

@wizzeh
wizzeh / partial_corr.py
Created October 13, 2016 19:15
Partial Correlation in Python
"""
Partial Correlation in Python
Based on Fabian Pedregosa-Izquierdo's implementation at:
https://gist.github.com/fabianp/9396204419c7b638d38f
This version of the algorithm calculates the partial correlation coefficient controlling for Z.
I use row vectors here, for whatever reason.
"""