We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add using Expectations etc. General syntax: expectation(x->f(x), Distribution(θ))
using Expectations
expectation(x->f(x), Distribution(θ))
using Expectations, Distributions; E=expectation; const μ=0.0; const σ=1.0; E(x->x, Normal(μ,σ)) E(x->exp(x), Normal(μ,σ)) exp(μ+ (σ^2)/2.) E(x->x^2, Normal(μ,σ)) E(x->x^2+exp(x), Normal(μ,σ)) # D = [Uniform(), Normal(), Gamma()]; d = MixtureModel(D); E.(x->x, D) E(x->x, d) #expectation of a mixture ( E(x->x,D[1]) + E(x->x,D[2]) + E(x->x,D[3]) )/3 # E(x->x^2, d) #expectation of a transformation of a mixture # truncated dist d=truncated(LogNormal(μ,σ),0.0,5.4) E(x->x, d) E(x->x^2, d) # truncated mixture d=truncated(MixtureModel(D),0.0,5.4) E(x->x, d) E(x->x^2, d)
If you can agree, I can submit PR.
The text was updated successfully, but these errors were encountered:
Hi @azev77, sure, I think the README should always be copy/pastable and detailed.
Thanks for your interest and looking forward to the PR.
Sorry, something went wrong.
No branches or pull requests
Add
using Expectations
etc.General syntax:
expectation(x->f(x), Distribution(θ))
If you can agree, I can submit PR.
The text was updated successfully, but these errors were encountered: