$npx skillfedfor your agent

formulaic-contrasts

Build contrasts for models defined with formulaic

With conditionsPyPI Scientific/EngineeringReleased Dec 2024159.6K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — formulaic_contrasts-1.0.0-py3-none-any.whl
v1.0.0 · released 2024-12-15 · Python >=3.10 · 3 runtime deps: formulaic, pandas, session-info

Yes, if you use formulaic-based models and need custom contrast coding. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It is niche—primarily useful for statistical modeling and research workflows—but well-suited to that purpose. Not necessary for general-purpose Python development.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Low friction installation with a pure-Python wheel.
  • Active maintenance as of August 2026 with recent commits.

License · maintenance · safety

permissive license (permissive) — BSD 3-Clause permissive license allows commercial use, modification, and distribution with minimal restrictions—attribution and liability disclaimer required.

last release 2024-12-15 (607 days) · last repo commit 2026-08-10 · 13 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 159,637 downloads/mo, #10,692 on PyPI

Verify before relying

pip install formulaic-contrasts

from formulaic_contrasts import ...
import formulaic
import pandas

# Build contrasts for a model formula
# See documentation for specific contrast functions
  • What specific contrast types or schemes the package supports beyond the cond() function mentioned in credits.
  • Whether the package is typically used standalone or primarily as a dependency of other statistical modeling libraries.
  • Performance characteristics when working with large categorical datasets or many contrast levels.
Same gist for agents: .md · .json

What it is and what it does

formulaic-contrasts extends the formulaic formula system with tools to build custom contrast matrices for categorical variables in statistical models. It provides functions like cond() to specify arbitrary comparison schemes, enabling researchers to define exactly how categorical predictors are encoded when fitting models. The package is designed for use within the scverse ecosystem and statistical modeling workflows where fine-grained control over contrast coding is needed.

The package depends on formulaic for formula parsing, pandas for data handling, and session-info for environment tracking. It targets Python 3.10+ and is actively maintained. Installation is straightforward via pip, and the library is intended to be used both directly by developers building custom models and indirectly as a dependency of higher-level statistical packages.

Use it for

  • Specify custom contrast schemes (e.g., treatment, sum, Helmert) for categorical variables in regression or generalized linear models.
  • Build multi-condition comparisons in biological or scientific models where standard contrast coding is insufficient.
  • Integrate contrast specification into formulaic-based model definitions for reproducible statistical workflows.
  • Develop custom statistical modeling libraries that need flexible contrast matrix generation.
  • Encode categorical predictors with domain-specific comparison logic in machine learning pipelines.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you use formulaic-based models and need custom contrast coding.

The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It is niche—primarily useful for statistical modeling and research workflows—but well-suited to that purpose. Not necessary for general-purpose Python development.

Install

formulaic-contrasts on PyPI

Before you install

Low friction installation with a pure-Python wheel. Active maintenance as of August 2026 with recent commits. Requires Python 3.10 or later. Three runtime dependencies (formulaic, pandas, session-info) are standard data-science libraries.

Requires Python 3.10 or later.

License in practice

BSD 3-Clause permissive license allows commercial use, modification, and distribution with minimal restrictions—attribution and liability disclaimer required.

Quickstart

pip install formulaic-contrasts

from formulaic_contrasts import ...
import formulaic
import pandas

# Build contrasts for a model formula
# See documentation for specific contrast functions

Verify before relying

  • What specific contrast types or schemes the package supports beyond the cond() function mentioned in credits.
  • Whether the package is typically used standalone or primarily as a dependency of other statistical modeling libraries.
  • Performance characteristics when working with large categorical datasets or many contrast levels.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
formulaicpandassession-info
MaintenanceActively maintained 607 days since the last release
Last repo commit
First released
Downloads159,637 / month, #10,692 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Evidence: formulaic_contrasts-1.0.0-py3-none-any.whl

Tags

Capabilities
contrast coding for modelsformulaic contrastscategorical variable comparisonsmodel contrast matricesstatistical contrast buildingformula-based contrastscustom contrast schemes
Topics
statistical-modelingcontrastsformula-system

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 › “contrast coding for models”

Give your agent the search over MCP, or paste the wish link into any chat.

More Scientific/Engineering packages

numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
pandas Worth it
PyPI · Scientific/Engineering · released Jul 2026

pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.

BSD-3-Clausecompiled wheel · 3.11+
769.1Mdownloads / mo
scipy Worth it
PyPI · Libraries · released Jun 2026

scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.

BSD-3-Clausecompiled wheel · 3.12+
449.0Mdownloads / mo
scikit-learn Worth it
PyPI · Software Development · released Jun 2026

scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.

Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.

BSD-3-Clausecompiled wheel · 3.11+
235.5Mdownloads / mo
dill Worth it
PyPI · Software Development · released Jan 2026

dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.

BSD-3-Clausepure Python · 3.9+
208.1Mdownloads / mo
multiprocess Worth it
PyPI · Software Development · released Jan 2026

Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.

Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.

BSD-3-Clausepure Python · 3.9+
202.7Mdownloads / mo

See also formulaic · patsy · category-encoders · tabmat · kmodes · cmaes · linearmodels · pydeseq2 · phik · color-operations