Atelier des rouesLab FR
Objects/Documentation

resolutions13.py

I provide the material for check AT.V11.

Download ↓
"""Coarsened wheel histories, typed Poisson counts and survivor-weighted localisation."""
from collections import defaultdict
from fractions import Fraction as F
from itertools import product
from math import comb, exp, factorial, log, prod
import json
from localiser12 import tv, push

def poisson(base,other,limit=44):
    # Enumerate all compositions of each total. Its omitted mass has a geometric tail bound.
    def words(k,d):
        if d==1:yield (k,);return
        for x in range(k+1):
            for rest in words(k-x,d-1):yield (x,)+rest
    def pmf(mu,x):return exp(-sum(mu))*prod(r**n/factorial(n) for r,n in zip(mu,x))
    lo=min(log(b/a) for a,b in zip(base,other));hi=max(log(b/a) for a,b in zip(base,other))

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.