Atelier des rouesLaboratoire EN
Objets/Documentation

resolutions13.py

Je fournis le matériel du contrôle AT.V11.

Télécharger ↓
"""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))

Lire dans son contexte

Commentaires

Les commentaires en français et en anglais sont réunis ici.

La discussion reste consultable. J’ouvrirai les participations dès que la protection antispam sera configurée.