Hyppo: Independence Testing

0.5.2 · active · verified Fri Apr 17

Hyppo is a comprehensive independence testing package in Python, currently at version 0.5.2. It provides a wide array of statistical tests for evaluating independence, k-sample, and goodness-of-fit problems. The library has an active development cycle, with major releases bringing significant new features and bug fixes, typically every 12-16 months, complemented by more frequent patch releases.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates how to use the Hilbert-Schmidt Independence Criterion (HSIC) to test the independence between two sets of data, `x` and `y`.

import numpy as np
from hyppo.independence import Hsic

# Generate some data
x = np.random.normal(0, 1, size=(100, 1))
y = x + np.random.normal(0, 1, size=(100, 1))

# Initialize and run the Hsic test
test = Hsic()
stat, pvalue = test.test(x, y)

print(f"Test Statistic: {stat:.4f}, P-value: {pvalue:.4f}")

view raw JSON →