Python version of the original MATLAB code of Hilbert-Schmidt Independence Criterion (HSIC).
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- NumPy
- SciPy
We tested the code using Anaconda 4.3.0 64-bit for python 2.7 on windows. Any later version should still work perfectly.
Import HSIC using
from HSIC import hsic_gam
Apply HSIC on your data
testStat, thresh = hsic_gam(x, y, alph = 0.05)
Input of function hsic_gam()
| Argument | Description |
|---|---|
| x | Data of the first variable. L by dim_x numpy array. |
| y | Data of the second variable. L by dim_y numpy array. |
| alph | level of the test |
Output of function hsic_gam()
| Argument | Description |
|---|---|
| testStat | test threshold for level alpha test |
| thresh | test statistic |
- If testStat < thresh, x and y are independent.
- If testStat > thresh, x and y are not independent.
- Shoubo Hu - shoubo [dot] sub [at] gmail [dot] com
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.