{"id":9822,"library":"hyppo","title":"Hyppo: Independence Testing","description":"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.","status":"active","version":"0.5.2","language":"python","source_language":"en","source_url":"https://github.com/neurodata/hyppo","tags":["statistics","machine-learning","independence-testing","hypothesis-testing","nonparametric"],"install":[{"cmd":"pip install hyppo","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core numerical operations.","package":"numpy","optional":false},{"reason":"Core numerical operations.","package":"scipy","optional":false},{"reason":"Machine learning utilities and kernel functions.","package":"scikit-learn","optional":false},{"reason":"Required for automatic differentiation in some kernel computations.","package":"autograd","optional":false}],"imports":[{"symbol":"Hsic","correct":"from hyppo.independence import Hsic"},{"symbol":"Dcorr","correct":"from hyppo.independence import Dcorr"},{"symbol":"Energy","correct":"from hyppo.ksample import Energy"}],"quickstart":{"code":"import numpy as np\nfrom hyppo.independence import Hsic\n\n# Generate some data\nx = np.random.normal(0, 1, size=(100, 1))\ny = x + np.random.normal(0, 1, size=(100, 1))\n\n# Initialize and run the Hsic test\ntest = Hsic()\nstat, pvalue = test.test(x, y)\n\nprint(f\"Test Statistic: {stat:.4f}, P-value: {pvalue:.4f}\")","lang":"python","description":"This example demonstrates how to use the Hilbert-Schmidt Independence Criterion (HSIC) to test the independence between two sets of data, `x` and `y`."},"warnings":[{"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'`).","message":"Hyppo 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.","severity":"breaking","affected_versions":">=0.5.0"},{"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.","message":"Starting 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.","severity":"breaking","affected_versions":">=0.5.2"},{"fix":"Manually install `autograd`: `pip install autograd`. Ensure your Python environment is clean or use a virtual environment.","message":"The `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.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'-16':57 '0.5.2':16 '12':56 'activ':41 'array':21 'bring':47 'bug':52 'complement':59 'comprehens':7 'current':13 'cycl':43 'develop':42 'evalu':26 'everi':55 'featur':50 'fit':35 'fix':53 'frequent':62 'good':33 'goodness-of-fit':32 'hypothesi':73 'hypothesis-test':72 'hyppo':1,4 'independ':2,8,27,70 'independence-test':69 'k':29 'k-sampl':28 'learn':68 'librari':38 'machin':67 'machine-learn':66 'major':45 'month':58 'new':49 'nonparametr':75 'packag':10 'patch':63 'problem':36 'provid':18 'python':12 'releas':46,64 'sampl':30 'signific':48 'statist':23,65 'test':3,9,24,71,74 'typic':54 'version':15 'wide':20","created_at":"2026-04-17T01:20:54.251253+00:00","updated_at":"2026-04-17T01:20:54.251253+00:00","problems":[{"fix":"Install `autograd` explicitly: `pip install autograd`.","cause":"The `autograd` library, a mandatory dependency for Hyppo, is not installed or not accessible in your Python environment.","error":"ModuleNotFoundError: No module named 'autograd'"},{"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'`.","cause":"You are attempting to use Hyppo version 0.5.0 or newer with a Python version older than 3.8.","error":"RuntimeError: Python version must be >= 3.8.0 to use hyppo>=0.5.0"},{"fix":"Implement the `gradient` method within your `MyCustomKernel` class to define how its gradients are computed.","cause":"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.","error":"AttributeError: 'MyCustomKernel' object has no attribute 'gradient'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.5.2","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/neurodata/hyppo","docs":null,"changelog":null,"pypi":"https://pypi.org/project/hyppo/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}