Skip to content

Instantly share code, notes, and snippets.

View fedarko's full-sized avatar

Marcus Fedarko fedarko

View GitHub Profile
@fedarko
fedarko / poisson-cat.py
Created April 17, 2019 22:18 — forked from mortonjt/poisson-cat.py
Closed form categorical Poisson regression
import numpy as np
import patsy
import pandas as pd
from biom import Table
# This is the main function
def poisson_cat(table, metadata, category, ref=None):
""" Poisson differential abundance.
Parameters