Summary
Several quivers.formulas response families compile to observe-family names that the DSL _FAMILY_REGISTRY does not define, so fit(..., family=...) fails at compile time. The quivers.formulas module docstring also advertises families (Poisson / NegBin / Cumulative / hurdle / mixture) that are not backed.
Affected families (src/quivers/formulas/family.py)
| family key |
observe_family |
in DSL _FAMILY_REGISTRY? |
poisson |
Poisson |
no |
binomial |
Binomial |
no |
negative_binomial |
NegativeBinomial |
no |
cumulative |
OrderedLogistic |
no |
The released DSL registry (quivers.dsl.compiler._get_family_registry()) backs only: Bernoulli, Categorical, Normal, Beta, Gamma, StudentT, the continuous loc-scale / positive / (0,1) families, Dirichlet, MVN, etc. No Poisson / Binomial / NegativeBinomial / OrderedLogistic.
Repro (the OrderedLogistic case is directly verifiable in the DSL, 0.13.0)
from quivers.dsl import loads
loads("""
object Resp : FinSet 10
program m : Resp -> Resp
sample eta <- Normal(0.0, 1.0)
let cutpoints = zeros(4)
observe y : Resp <- OrderedLogistic(eta, cutpoints)
return y
export m
""")
quivers.dsl.compiler.CompileError: line 6, col 4: undefined morphism or distribution family 'OrderedLogistic'
The formula path (fit(formula, data, family="cumulative")) routes through the same compiler, so it raises the same error. family="poisson" | "binomial" | "negative_binomial" fail identically (registry has no matching family).
Expected
Either (a) register the corresponding observe families so the declared formula families compile, or (b) remove the unsupported entries from families and trim the quivers.formulas.__init__ docstring so it only lists families that actually compile.
Notes
OrderedLogistic/cumulative-link is the one most likely to be missed — ordinal responses are common. A workaround is cutpoints + Categorical(probs) with probs built from sigmoid(c_k - eta) differences, but a first-class OrderedLogistic family would be the clean fix.
- Still present on
main (HEAD 4fefe49): poisson / negative_binomial / cumulative have no registered backing.
Summary
Several
quivers.formulasresponse families compile toobserve-family names that the DSL_FAMILY_REGISTRYdoes not define, sofit(..., family=...)fails at compile time. Thequivers.formulasmodule docstring also advertises families (Poisson / NegBin / Cumulative / hurdle / mixture) that are not backed.Affected families (
src/quivers/formulas/family.py)observe_family_FAMILY_REGISTRY?poissonPoissonbinomialBinomialnegative_binomialNegativeBinomialcumulativeOrderedLogisticThe released DSL registry (
quivers.dsl.compiler._get_family_registry()) backs only: Bernoulli, Categorical, Normal, Beta, Gamma, StudentT, the continuous loc-scale / positive / (0,1) families, Dirichlet, MVN, etc. No Poisson / Binomial / NegativeBinomial / OrderedLogistic.Repro (the OrderedLogistic case is directly verifiable in the DSL, 0.13.0)
The formula path (
fit(formula, data, family="cumulative")) routes through the same compiler, so it raises the same error.family="poisson" | "binomial" | "negative_binomial"fail identically (registry has no matching family).Expected
Either (a) register the corresponding observe families so the declared formula families compile, or (b) remove the unsupported entries from
familiesand trim thequivers.formulas.__init__docstring so it only lists families that actually compile.Notes
OrderedLogistic/cumulative-link is the one most likely to be missed — ordinal responses are common. A workaround is cutpoints +Categorical(probs)withprobsbuilt fromsigmoid(c_k - eta)differences, but a first-classOrderedLogisticfamily would be the clean fix.main(HEAD 4fefe49): poisson / negative_binomial / cumulative have no registered backing.