Skip to content

ex2o/hsic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

HSIC Python

This repository contains code for calculating the Hilbert-Schmidt Independence Criterion in Python as in [1] Measuring Statistical Dependence with Hilbert-Schmidt Norms (2005) and [2] Kernel-based Tests for Joint Independence (2016)

Files

  • hsic.py: Contains the code needed to calculate the HSIC
  • run_examples.py: Examples for usage

Dependencies

The scripts are written for Python 3.6 and require Numpy

Usage

Download the file hsic.py, and (add it to the system path, or) from within the same directory execute the following from within a Python REPL or a .py file

from hsic import dHSIC
dHSIC(X, Y, ...)

where all inputs to dHSIC, X and Y etc, are of type numpy.ndarray. If only two inputs X and Y are passed to dHSIC, the simpler HSIC is automatically called, and the hsic value is computed as in [1], eq. (9). If more than two inputs are passed to dHSIC, the computation is done as in [2], Definition 2.6.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages