All Projects → QuantEcon → Expectations.jl

QuantEcon / Expectations.jl

Licence: MIT License
Expectation operators for Distributions.jl objects

Programming Languages

julia
2034 projects
TeX
3793 projects

Projects that are alternatives of or similar to Expectations.jl

Math Php
Powerful modern math library for PHP: Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra
Stars: ✭ 2,009 (+3918%)
Mutual labels:  statistics, distributions
gitstats
simple statistical analysis tool for git repositories
Stars: ✭ 16 (-68%)
Mutual labels:  statistics
Kdepy
Kernel Density Estimation in Python
Stars: ✭ 244 (+388%)
Mutual labels:  statistics
stanTuneR
This code uses the algebra solver in Stan (https://mc-stan.org/) to find the parameters of a distribution that produce a desired tail behavior.
Stars: ✭ 28 (-44%)
Mutual labels:  distributions
Miller
Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON
Stars: ✭ 4,633 (+9166%)
Mutual labels:  statistics
forestError
A Unified Framework for Random Forest Prediction Error Estimation
Stars: ✭ 23 (-54%)
Mutual labels:  statistics
Datascience
Curated list of Python resources for data science.
Stars: ✭ 3,051 (+6002%)
Mutual labels:  statistics
awesome-datascience-python
Awesome list Data Science and Python. 🐍
Stars: ✭ 62 (+24%)
Mutual labels:  statistics
btsa
Berlin Time Series Analysis Repository
Stars: ✭ 60 (+20%)
Mutual labels:  statistics
cmna-pkg
Computational Methods for Numerical Analysis
Stars: ✭ 13 (-74%)
Mutual labels:  quadrature
EncoderTool
The EncoderTool is a library to manage and read out rotary encoders connected either directly or via multiplexers to ARM based boards. Encoder push buttons are supported. Callback functions can be attached to encoder changes and button presses to allow for event driven applications
Stars: ✭ 29 (-42%)
Mutual labels:  quadrature
stan-distributions
A web app to visualize distributions in Stan. Uses Stan Math C++ compiled to Webassembly to evaluate the functions using actual Stan implementations. Uses d3.js for visualizations.
Stars: ✭ 30 (-40%)
Mutual labels:  distributions
roc comparison
The fast version of DeLong's method for computing the covariance of unadjusted AUC.
Stars: ✭ 83 (+66%)
Mutual labels:  statistics
Stanford Cme 106 Probability And Statistics
VIP cheatsheets for Stanford's CME 106 Probability and Statistics for Engineers
Stars: ✭ 242 (+384%)
Mutual labels:  statistics
FantasyPremierLeague.py
⚽ Statistics for your mini leagues.
Stars: ✭ 123 (+146%)
Mutual labels:  statistics
Histogram
Fast multi-dimensional generalized histogram with convenient interface for C++14
Stars: ✭ 243 (+386%)
Mutual labels:  statistics
actuar
Actuarial functions and heavy tailed distributions for R
Stars: ✭ 19 (-62%)
Mutual labels:  distributions
VINF
Repository for DTU Special Course, focusing on Variational Inference using Normalizing Flows (VINF). Supervised by Michael Riis Andersen
Stars: ✭ 23 (-54%)
Mutual labels:  distributions
wrapperr
Website and API that collects Plex statistics using Tautulli and displays it. Similar to the Spotify Wrapped concept.
Stars: ✭ 93 (+86%)
Mutual labels:  statistics
hdfe
No description or website provided.
Stars: ✭ 22 (-56%)
Mutual labels:  statistics

CI codecov

Expectations

Installation (for Julia v1.0 and up):

pkg> add Expectations

See Pkg docs for more details

This is a package designed to simplify the process of taking expectations of functions of random variables.

Expectation Operator

The key object is the expectation function, which returns an operator:

dist = Normal()
E = expectation(dist)
E(x -> x)

For convenience, the operator can be applied directly to a function instead of being cached,

expectation(x->x^2, dist)

As a linear operator on vectors using the nodes of the distribution

dist = Normal()
E = expectation(dist)
x = nodes(E)
f(x) = x^2
E * f.(x) == dot(f.(x), weights(E))

Random Variables

The underlying distributions are objects from Distributions.jl (currently <:UnivariateDistribution).

Starting with 1.3.0, we also support mixture models.

Quadrature Algorithms

We support different types of Gaussian quadrature (Gauss-Hermite, Gauss-Legendre, Gauss-Laguerre, etc.) based on the distribution, as well as some methods with user-defined nodes (e.g., trapezoidal integration).

We have rules for the following distributions:

  • Normal
  • ChiSq
  • LogNormal
  • Exponential
  • Beta
  • Gamma/Erlang
  • Uniform
  • Continuous Univariate (compact; generic fallback)
  • Continuous Univariate (no restriction; approximates with quantile grid)
  • Discrete

See docs for more info.

Mixture Models

We also support mixture models, e.g.

d = MixtureModel([Uniform(), Normal(), Gamma()]);
E = expectation(d);
E(x -> x) # 0.5000000000000016

The MixtureExpectation objects support most of the same behavior as the individual IterableExpectations.

2E(x -> x) # 1.000000000000003
weights(E) # [1/3, 1/3, 1/3]
expectations(E) # component expectations
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].