Comments (4)
I find that the code also takes a really long time to run using a multvariate normal distribution
#User Input
N = 7
tol = 2
alg = HCubatureJL()
# Setting up problem
reltol_val = 10.0^(-tol)
abstol_val = 10.0^(-tol)
means = rand(N)
vars = Diagonal(abs.(rand(N,N)))
d = MvNormal(means , vars)
m(x , p) = pdf(d, x) .* x
prob = QuadratureProblem(m, -Inf*ones(N) , Inf*ones(N))
time_start = time()
mem_usage = @allocated sol_mean = Quadrature.solve(prob,alg,reltol=1e-2,abstol=1e-2)
total_mem = mem_usage/1000/2^20
display(sol_mean)
display(means)
'''
from integrals.jl.
Methods like HCubature
grow exponentially with dimension. CubaVegas
and CubaSUAVE
have better properties at higher dimensions.
from integrals.jl.
I'm finding that with CubaSUAVE and CubaVegas that for large N (N > 10) the solutions are inaccurate. Is this expected behavior or am I doing something wrong?
#User Input
N = 15
tol = 3 #even if I try tol = 10 or 15 still inaccurate.
alg = CubaSUAVE()
# Setting up problem
reltol_val = 10.0^(-tol)
abstol_val = 10.0^(-tol)
means = rand(N)
vars = Diagonal(abs.(rand(N,N)))
d = MvNormal(means , vars)
m(x , p) = pdf(d, x) .* x
function f_normal(x,p)
sum(pdf(d,x) .* x)
end
prob = QuadratureProblem(f_normal, -Inf*ones(N) , Inf*ones(N), nout=1)
time_start = time()
mem_usage = @allocated sol_mean = Quadrature.solve(prob,alg,reltol=reltol_val,abstol=abstol_val)
total_mem = mem_usage/1000/2^20
display(sol_mean.u)
display(sum(means))
from integrals.jl.
You might need to increase maxiters
.
from integrals.jl.
Related Issues (20)
- It would be nice to have a `progress` keyword for time estimation HOT 7
- Improve docstrings
- Inconsistent IntegralsCubature Interface
- Example from the first tutorial is broken HOT 5
- Interface error for VEGAS from [email protected]
- Warp MCIntegration.jl
- Issue when Nesting Integrals without Explicit Floats
- Factor out MonteCarloIntegration.jl into extension package HOT 2
- BoundsError: attempt to access Float64 at index [2] when `pi` is passed as limit HOT 1
- Add tests
- Missing documentation for IntegralFunction and BatchIntegralFunction HOT 3
- HCubature does not work with ODESolution produced by some ODE solvers HOT 6
- Unhelpful error message when not importing the correct packages HOT 3
- nout > 1 for QuadGK HOT 1
- Use `alg` in `build_solution` rather than constructing a new algorithm HOT 1
- `IntegralProblem` keywords not passed to solvers
- Gauss-Turán Quadratures HOT 8
- Strange instalation or upgrade error HOT 2
- Integrating a vector valued out-of-place integrand returns a scalar HOT 3
- ForwardDiff differentiates through solver HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from integrals.jl.