epistasis-v2¶
epistasis-v2 is a high-performance Python library for fitting epistatic interactions in genotype-phenotype maps (GPMs). It provides linear and nonlinear regression models, Bayesian sampling, and simulation utilities, all backed by Rust-accelerated kernels and a Walsh-Hadamard fast path that delivers up to 6,000x speedup over the previous generation at full interaction order.
-
Quick Start
Install the library and fit your first epistasis model in minutes.
-
Installation
Requirements, pip install, and build from source with Rust.
-
Core Concepts
Understand genotype-phenotype maps, epistasis, and design matrices.
-
Models
Linear, regularized, nonlinear, and classifier epistasis models.
-
Simulation
Generate synthetic GPMs with known epistatic coefficients.
-
Cross-Validation
Evaluate model performance with k-fold and holdout validation.
-
Bayesian Sampling
Quantify parameter uncertainty with MCMC ensemble sampling.
-
API Reference
Complete reference for stats, fast paths, and exceptions.
Why epistasis-v2?¶
-
Install
-
Load your data
Wrap your genotypes and phenotypes in a
GenotypePhenotypeMapfromgpmap-v2. -
Fit a model
Choose a model (
EpistasisLinearRegression,EpistasisLasso, orEpistasisNonlinearRegression), attach your GPM, and call.fit(). -
Inspect coefficients
Read fitted epistatic coefficients and standard errors from
model.epistasis.valuesandmodel.epistasis.stdeviations.
Note
epistasis-v2 is currently in alpha. The public API is stable for the ported modules, but some features (sparse Lasso at very high order, power/spline nonlinear variants) are still in progress.