Registry / data / hyppo
library0.5.2pypypi✓ verified 85d ago

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.

pip install hyppo
INSTALL
IMPORT
SIG · HYPPO
H
hyppo
datapythonv0.5.2
Install
20.2s avg
Import
5538ms
Disk
600MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
installs and imports cleanly · install 20.2s · import 5.538s · 587MB
600MB installed
● package 600MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Hsic
from hyppo.independence import Hsic
Dcorr
from hyppo.independence import Dcorr
Energy
from hyppo.ksample import Energy

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}")
Debug
Known issues
breakingHyppo versions 0.5.0 and newer require Python 3.8 or higher. Users on older Python versions (3.6 or 3.7) will encounter errors if they upgrade past 0.4.x.
fix
Upgrade your Python environment to 3.8+ or pin `hyppo` to a version less than 0.5.0 (e.g., `pip install 'hyppo<0.5.0'`).
affects: >=0.5.0
breakingStarting from v0.5.2, the `DifferentiableKernel` class no longer provides an automatic `autograd` fallback for gradients. If you are implementing custom differentiable kernels, you must now manually define the `gradient` method.
fix
For custom `DifferentiableKernel` subclasses, ensure you explicitly implement the `gradient` method with the desired differentiation logic. Do not rely on `autograd` to implicitly provide it.
affects: >=0.5.2
gotchaThe `autograd` library is a core dependency for `hyppo`. While `pip install hyppo` typically handles this, if you encounter `ModuleNotFoundError` related to `autograd`, it might be missing or conflict with your environment.
fix
Manually install `autograd`: `pip install autograd`. Ensure your Python environment is clean or use a virtual environment.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'autograd'
The `autograd` library, a mandatory dependency for Hyppo, is not installed or not accessible in your Python environment.
fix
Install `autograd` explicitly: `pip install autograd`.
RuntimeError: Python version must be >= 3.8.0 to use hyppo>=0.5.0
You are attempting to use Hyppo version 0.5.0 or newer with a Python version older than 3.8.
fix
Upgrade your Python interpreter to version 3.8 or newer, or downgrade Hyppo to version 0.4.x or older: `pip install 'hyppo<0.5.0'`.
AttributeError: 'MyCustomKernel' object has no attribute 'gradient'
If `MyCustomKernel` inherits from `DifferentiableKernel` and you are using `hyppo` v0.5.2 or newer, the `autograd` fallback for gradients was removed. You must now provide your own `gradient` method.
fix
Implement the `gradient` method within your `MyCustomKernel` class to define how its gradients are computed.
Upgrade
Version history
0.5.2latest on PyPI · released May 24, 2025
Audit
Dependencies
numpyrequiredCore numerical operations.
scipyrequiredCore numerical operations.
scikit-learnrequiredMachine learning utilities and kernel functions.
autogradrequiredRequired for automatic differentiation in some kernel computations.
Agent activity
4 hits · last 30 days
node
4
Resources
hyppo — pip install hyppo · libregistry