Skip to content

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.

    Quick Start

  • Installation


    Requirements, pip install, and build from source with Rust.

    Installation

  • Core Concepts


    Understand genotype-phenotype maps, epistasis, and design matrices.

    Core Concepts

  • Models


    Linear, regularized, nonlinear, and classifier epistasis models.

    Models

  • Simulation


    Generate synthetic GPMs with known epistatic coefficients.

    Simulation

  • Cross-Validation


    Evaluate model performance with k-fold and holdout validation.

    Cross-Validation

  • Bayesian Sampling


    Quantify parameter uncertainty with MCMC ensemble sampling.

    Bayesian Sampling

  • API Reference


    Complete reference for stats, fast paths, and exceptions.

    API Reference

Why epistasis-v2?

  1. Install

    pip install epistasis-v2
    
  2. Load your data

    Wrap your genotypes and phenotypes in a GenotypePhenotypeMap from gpmap-v2.

  3. Fit a model

    Choose a model (EpistasisLinearRegression, EpistasisLasso, or EpistasisNonlinearRegression), attach your GPM, and call .fit().

  4. Inspect coefficients

    Read fitted epistatic coefficients and standard errors from model.epistasis.values and model.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.