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
I am trying to use following univariate distribution case to transform it into a multivariate distribution case:
α=categorical([0.3, 0.7]) function x_(rng) #α=categorical([0.1, .9]) if(α(rng)==1) x=normal(rng, 0.3, .1) elseif(α(rng)==2) x=normal(rng, -0.3, .1) elseif(α(rng)==3) x=normal(rng, 0.0, .01) end end AM_SAMPLES=10000 x = ciid(x_) samples=[rand(x) for i=1:AM_SAMPLES] display(histogram!(samples, subplot=1)) x_interv=replace(x, α=>categorical([0.7, 0.2, 0.1]))
I am wondering how to use mvnormal (Omega multivariate distributions do not work for me). I used instead the Distributions.jl MvNormal function.
α=categorical([0.3, 0.7]) function x_(rng) if(α(rng)==1) rand(MvNormal([-2.0;-4.0], [1.0 0.0;0.0 1.0])) elseif(α(rng)==2) rand(MvNormal([2.0;-1.0], [1.0 0.0;0.0 1.0])) else rand(MvNormal([3.0;6.0], [1.0 0.0;0.0 1.0])) end end AM_SAMPLES=500 x = ciid(x_) samples=[rand(x) for i=1:AM_SAMPLES]
This example worked for me. But I am wondering why I need rand(...) inside the function x_
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to use following univariate distribution case to transform it into a multivariate distribution case:
I am wondering how to use mvnormal (Omega multivariate distributions do not work for me). I used instead the Distributions.jl MvNormal function.
This example worked for me. But I am wondering why I need rand(...) inside the function x_
The text was updated successfully, but these errors were encountered: