Aleator.Library
0.4.1
See the version list below for details.
dotnet add package Aleator.Library --version 0.4.1
NuGet\Install-Package Aleator.Library -Version 0.4.1
<PackageReference Include="Aleator.Library" Version="0.4.1" />
<PackageVersion Include="Aleator.Library" Version="0.4.1" />
<PackageReference Include="Aleator.Library" />
paket add Aleator.Library --version 0.4.1
#r "nuget: Aleator.Library, 0.4.1"
#:package Aleator.Library@0.4.1
#addin nuget:?package=Aleator.Library&version=0.4.1
#tool nuget:?package=Aleator.Library&version=0.4.1
Aleator.Library
Standard element library of Aleator, the C# port of the Figaro probabilistic programming library:
- Atomic continuous distributions —
Normal,Uniform,Exponential,Gamma,Beta,Dirichlet,InverseGamma,LogNormal,StudentT,Cauchy,Laplace,Weibull,Pareto,ChiSquared,Gumbel,LogisticDistribution,Rayleigh,SkewNormal,VonMises,MultivariateNormal(Cholesky),OrderedNormal(an increasing vector: ordinal cutpoints),KernelDensity. - Atomic discrete distributions —
Binomial,BetaBinomial,Poisson,ZeroInflatedPoisson,HurdlePoisson,Geometric,NegativeBinomial,ZeroInflatedNegativeBinomial2,Hypergeometric,Multinomial,OrderedLogistic,OrderedProbit,CategoricalLogits,UniformInt,FromRange,SwitchingFlip,IntSelector(withOneShifterMH proposals). - Element-parameter (
Compound*) forms of every family —CompoundNormal,CompoundStudentT,CompoundLogNormal,CompoundCauchy,CompoundLaplace,CompoundExponential,CompoundGamma,CompoundInverseGamma,CompoundWeibull,CompoundPareto,CompoundChiSquared,CompoundBeta,CompoundUniform,CompoundGumbel,CompoundLogisticDistribution,CompoundRayleigh,CompoundSkewNormal,CompoundVonMises,CompoundDirichlet,CompoundMultivariateNormal(element mean),CompoundBinomial,CompoundBetaBinomial,CompoundPoisson,CompoundZeroInflatedPoisson,CompoundHurdlePoisson,CompoundNegativeBinomial2(mean and dispersion),CompoundZeroInflatedNegativeBinomial2,CompoundGeometric,CompoundOrdinal(ordered logistic or probit),CompoundCategoricalLogits,CompoundSelect,CompoundDist. These take their parameters from other elements, which is what makes a hierarchy a graph edge rather than a hand-rolledChain: inference, learning discovery and the gradient bridge all read the dependency offArguments. Truncated— any distribution that answersICumulativeDistribution(Normal,Exponential,Uniform,LogNormal,Gamma,Beta,InverseGamma,StudentT,ChiSquared,Cauchy,Laplace,Weibull,Pareto,Gumbel,LogisticDistribution,Rayleigh, andTruncateditself) restricted to an interval and renormalised over it. Drawn by inverting the CDF, so no sample is rejected and a window in the far tail is sampled as readily as one at the mode.Censored— a distribution clipped to an interval, the mass beyond a bound moved onto it (the Tobit model of a saturating measurement): the inner density inside, the censored mass at a bound, so an observation recorded at a detection limit is scored as "at or beyond it".Mixture— a finite mixture with fixed weights as one atomic distribution, with a density, a CDF when the components have one, and draws.CompoundTruncated,CompoundCensored,CompoundMixture— the same wrappers over families whose parameters are elements (y ~ normal(mu, sigma) T[0,], a Tobit record with a latent mean, a mixture with latent means orDirichletweights), renormalising, censoring or mixing at the parameters sampled in each world. TheAleafactories pick them from the family the factory lambda returns.- Deterministic combinators —
CPD/RichCpdpattern matching,Inject, tuples, boolean/arithmetic operators. - Open-universe collections —
Container,Process,FixedSizeArray,MakeArray,VariableSizeArray,MakeList. - Decisions (
Decision, policies), references, nonparametrics (Dirichlet-process mixture, CRP, IBP), and theAleator.Language.Aleastatic factory facade.
using static Aleator.Language.Alea;
var bias = Beta(2, 5);
var coin = Flip(bias);
// A hierarchy: each level takes the one above it as a parameter.
var mu = Normal(0, 10);
var theta = Normal(mu, 1.0);
var y = Normal(theta, 1.0);
// A scale that cannot be negative, sampled exactly rather than by rejection.
var sigma = TruncatedNormal(0, 3, lower: 0);
// A robust likelihood and a truncated one, both with latent parameters.
var slope = Normal(0, 5);
var obs = StudentT(4.0, slope, sigma);
var positive = TruncatedNormal(slope, sigma, lower: 0);
// Over-dispersed counts on the log link, and an ordinal response with ordered latent cutpoints.
var counts = NegativeBinomial2(Exp(slope), 3.0);
var rating = OrderedLogistic(slope, OrderedNormal(3, 0, 2));
Zero third-party dependencies. Pair with Aleator.Algorithms for inference.
Documentation: atalib.com/docs. Runnable examples: atalib.com/examples.html.
Questions, bug reports and feedback: contact the maintainers through nuget.org. The source repository is
private, so there is no public issue tracker yet. Report a suspected vulnerability the same way, with SECURITY: at the
start of the subject, and do not disclose it publicly before it is fixed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Aleator.Core (>= 0.4.1)
- System.Numerics.Tensors (>= 10.0.15)
-
net8.0
- Aleator.Core (>= 0.4.1)
- System.Numerics.Tensors (>= 10.0.15)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Aleator.Library:
| Package | Downloads |
|---|---|
|
Aleator.AutoDiff
Reverse-mode automatic differentiation, unconstraining transforms, and a differentiable joint-density builder for gradient-based inference (HMC/NUTS/ADVI/SVGD, Gaussian processes) in Aleator. |
|
|
Aleator.Algorithms
Inference algorithms (VE, BP, Importance, Metropolis-Hastings, Gibbs, EM, particle filtering, lazy, structured, causal) for Aleator. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.5.1 | 61 | 11/21/2026 |
| 0.4.1 | 165 | 11/12/2026 |
| 0.3.0-preview.1 | 166 | 9/6/2026 |