Examples Gallery¶
.qvr programs spanning probabilistic regressions, latent-variable
models, state-space models, language models, encoder-decoder networks,
and weighted deductions. Most full pages include a ## Try it section;
CI executes runnable documentation blocks and skips blocks marked as
illustrative. Pages with current model limitations identify them directly.
All source files live under docs/examples/source/.
Regressions¶
- Bayesian Linear Regression: Normal likelihood with Normal-prior weights.
- Beta Regression: Beta-distributed response with logit link.
- Gamma Regression: Gamma response with a log-shape predictor and unit rate.
- Horseshoe Regression: sparse linear regression under the horseshoe prior.
- Negative Binomial Regression: overdispersed count response.
- Continuous-gate Poisson Regression: differentiable relaxation of a zero-inflation gate.
- Item Response Theory (2PL): Rasch-style logistic IRT with item difficulty and discrimination.
- Weibull Survival: uncensored Weibull event-time regression; censored rows require an explicit survival-score term.
Latent-variable models¶
- Factor Analysis: current isotropic-noise factor model, equivalent in noise structure to PPCA.
- Probabilistic PCA: isotropic-noise special case of factor analysis.
- Latent Dirichlet Allocation: topic model with Dirichlet priors on per-document and per-topic distributions.
- Gaussian Mixture Model: finite mixture with grouped marginalization over the cluster label.
- Latent Decoder and Encoder Paths: prior-decoder program plus a separately exported encoder-decoder path; the current SVI block does not use the encoder as its guide.
- Bayesian Neural Network: nonlinear regression through an MLP-parameterised Normal kernel, made Bayesian after lifting priors over its weights.
- Parametric Partial Pooling: random effects from a parametric program template, with a labeled return tuple, a score-step sum-to-zero factor, and export selection.
- Probabilistic Matrix Factorization: low-rank Bayesian completion of a sparse rating matrix.
- Bilinear Tensor Contraction: neural-tensor-layer scoring of predicate-argument pairs via an operadic three-way contraction.
State-space and time-series models¶
- AR(1): first-order autoregressive Normal scalar series.
- Changepoint Model: piecewise-constant means with a sampled change point.
- Stochastic Volatility: AR(1) log-variance driving Normal returns.
- Gaussian-Kernel SSM: learned transition, emission, and filtering kernels; not a closed-form Kalman filter.
- Finite-State Path Composition: product-fuzzy transition and emission relations, plus a partial discrete-program sketch.
- Continuous-State Sequence Model: Gaussian transition, emission, and separately learned recognition kernels.
- Deep Markov Model: nonlinear-MLP transition and emission cells.
Language models¶
- Vanilla RNN LM: single-cell Elman RNN scored by a Categorical head.
- GRU-shaped LM: stochastic reset and update gates with a simplified candidate update.
- LSTM-shaped LM: stochastic gates without a separately threaded cell state.
- Dual-RNN Masked-Token Model: two left-to-right scans combined for a masked-token target.
- Transformer-shaped LM: parallel MLP-normal branches with a Categorical head; no dot-product self-attention or causal mask.
Encoder-decoder and structured outputs¶
- Sequence-to-Sequence: parallel encoder-decoder branches joined by a learned merge, without attention.
- Tree-Structured Score Tensor: recursive additive scores over a parametric tree.
Weighted deductions¶
- PCFG: probabilistic context-free grammar with learnable production weights.
- CCG: combinatory categorial grammar with forward / backward application and composition.
- Type-Logical Grammar (Lambek): Lambek calculus with residuated slashes and tensor.
- PMCFG: probabilistic multiple context-free grammar with WH-movement via a rank-2 non-terminal.
- Schema-Bundled Chart Parser: pattern-polymorphic rule schemas bundled into a differentiable CKY chart parser.
- Term Autoencoder: a signature, encoder, decoder, and loss compressing typed lambda terms.
- Multimodal TLG: Lambek calculus extended with diamond and box modalities.
- Custom Sequent Rules: user-defined sequents over a free residuated category.
- Quantifier Scope: continuation-monad lift for generalized quantifiers.
- Montague NLI: Montague-style lambda-term LFs plus modus-ponens NLI prover.