phik
Phi_K correlation analyzer library
Decision gist · record as of 2026-08-14
Yes, if you work with mixed-type data and need a single correlation method that handles categorical, ordinal, and interval variables together. The permissive MIT license and broad Python version support make adoption low-risk. However, the aging maintenance status (no release in 393 days) suggests checking whether active development continues before relying on it for production systems. No known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.9; depends on numpy, scipy, pandas, matplotlib, and joblib.
- Medium install friction due to compiled wheels for multiple Python versions (3.10–3.14) and platforms, but pre-built binaries are available.
- Package is aging (393 days since last release in July 2025) with no recent maintenance signal.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) permits commercial and private use with minimal restrictions, making it suitable for most projects.
last release 2025-07-17 (393 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,210,795 downloads/mo, #4,213 on PyPI
Alternatives
Verify before relying
pip install phik
import pandas as pd
import phik
df = pd.read_csv('data.csv')
phik_matrix = df.phik_matrix()
significance = df.significance_matrix()- Whether the package is actively maintained or if aging status indicates stalled development.
- Performance characteristics when applied to large datasets or high-dimensional correlation matrices.
- Specific use cases where Phi_K outperforms alternatives for mixed-type data beyond the published paper.
What it is and what it does
Phi_K is a correlation coefficient designed to handle mixed data types—categorical, ordinal, and interval variables—in a single analysis. Unlike traditional correlation methods that require homogeneous data types, Phi_K applies a refinement of Pearson's hypothesis test of independence, interpreting the contingency test statistic as if from a rotated bivariate normal distribution. It captures non-linear relationships and reverts to standard Pearson correlation when the input is bivariate normal, making it useful for exploratory data analysis on heterogeneous datasets.
The package integrates with pandas DataFrames through methods like `phik_matrix()`, `significance_matrix()`, and `global_phik()`, and includes utilities for generating correlation reports as PDFs. It depends on numpy, scipy, pandas, matplotlib, and joblib, and is available as pre-built wheels for Python 3.9–3.14 across macOS, Linux, and Windows. The methodology is grounded in a peer-reviewed publication and includes example notebooks for basic and advanced usage.
Use it for
- Compute correlation matrices for datasets mixing categorical survey responses, ordinal ratings, and continuous measurements.
- Detect non-linear dependencies between variables that Pearson correlation would miss.
- Generate statistical significance tests for variable-pair dependencies in contingency tables.
- Create correlation reports with visualizations for exploratory data analysis on mixed-type datasets.
- Identify outliers and unusual patterns via normalized residuals of contingency tests.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with mixed-type data and need a single correlation method that handles categorical, ordinal, and interval variables together.
The permissive MIT license and broad Python version support make adoption low-risk. However, the aging maintenance status (no release in 393 days) suggests checking whether active development continues before relying on it for production systems. No known vulnerabilities.
Install
phik on PyPI
Before you install
Medium install friction due to compiled wheels for multiple Python versions (3.10–3.14) and platforms, but pre-built binaries are available. Package is aging (393 days since last release in July 2025) with no recent maintenance signal.
Requires Python >= 3.9; depends on numpy, scipy, pandas, matplotlib, and joblib.
License in practice
MIT license (permissive) permits commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
pip install phik
import pandas as pd
import phik
df = pd.read_csv('data.csv')
phik_matrix = df.phik_matrix()
significance = df.significance_matrix()
Verify before relying
- Whether the package is actively maintained or if aging status indicates stalled development.
- Performance characteristics when applied to large datasets or high-dimensional correlation matrices.
- Specific use cases where Phi_K outperforms alternatives for mixed-type data beyond the published paper.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 5 packagesnumpyscipypandasmatplotlibjoblib |
| Maintenance | Aging 393 days since the last release |
| First released | |
| Downloads | 1,210,795 / month, #4,213 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9 |
Evidence: phik-0.12.5-cp310-cp310-macosx_10_13_x86_64.whl; phik-0.12.5-cp310-cp310-macosx_11_0_arm64.whl; phik-0.12.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; phik-0.12.5-cp310-cp310-win_amd64.whl; phik-0.12.5-cp311-cp311-macosx_10_13_x86_64.whl; phik-0.12.5-cp311-cp311-macosx_11_0_arm64.whl; phik-0.12.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; phik-0.12.5-cp311-cp311-win_amd64.whl; phik-0.12.5-cp312-cp312-macosx_10_13_x86_64.whl; phik-0.12.5-cp312-cp312-macosx_11_0_arm64.whl; phik-0.12.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; phik-0.12.5-cp312-cp312-win_amd64.whl; phik-0.12.5-cp313-cp313-macosx_10_13_x86_64.whl; phik-0.12.5-cp313-cp313-macosx_11_0_arm64.whl; phik-0.12.5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; phik-0.12.5-cp313-cp313-win_amd64.whl; phik-0.12.5-cp314-cp314-macosx_10_13_x86_64.whl; phik-0.12.5-cp314-cp314-macosx_11_0_arm64.whl; phik-0.12.5-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; phik-0.12.5-cp314-cp314-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “correlation coefficient mixed data types”
- phikPhi_K computes a correlation coefficient that works consistently…
- sweetvizSweetviz generates interactive HTML visualizations for exploratory…
- pingouinPingouin provides a comprehensive statistical analysis toolkit for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Information Analysis packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyarrow provides Python bindings to Apache Arrow's C++ libraries for efficient columnar data processing, serialization, and interoperability with pandas, NumPy, and other Python ecosystem tools.
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
Snowpark Python provides APIs to query and process data directly in Snowflake without moving data to your local system, with support for both native Snowpark and pandas-compatible interfaces.
Install it if you use Snowflake and want to process data without moving it to your application layer.
See also hyppo · category-encoders · pingouin · kmodes · hdbscan · scikit-surprise · tabmat · ipfn · catboost