Skip to content

Commit

Permalink
Merge pull request #85 from ArnoStrouwen/canon
Browse files Browse the repository at this point in the history
canonize docs
  • Loading branch information
ChrisRackauckas authored Oct 23, 2022
2 parents a4fd712 + b9130e9 commit 41d014f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# SciMLExpectations.jl: Expectated Values of Simulations and Uncertainty Quantification

[![Join the chat at https://gitter.im/JuliaDiffEq/Lobby](https://badges.gitter.im/JuliaDiffEq/Lobby.svg)](https://gitter.im/JuliaDiffEq/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://julialang.zulipchat.com #sciml-bridged](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged)
[![Global Docs](https://img.shields.io/badge/docs-SciML-blue.svg)](https://docs.sciml.ai/SciMLExpectations/stable/)

[![codecov](https://codecov.io/gh/SciML/SciMLExpectations.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/SciML/SciMLExpectations.jl)
[![Build Status](https://github.com/SciML/SciMLExpectations.jl/workflows/CI/badge.svg)](https://github.com/SciML/SciMLExpectations.jl/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/SciML/SciMLExpectations.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/JuliaDiffEq/SciMLExpectations.jl?branch=master)
[![codecov.io](http://codecov.io/github/JuliaDiffEq/SciMLExpectations.jl/coverage.svg?branch=master)](http://codecov.io/github/SciML/SciMLExpectations.jl?branch=master)

[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)
Expand Down
5 changes: 2 additions & 3 deletions docs/src/tutorials/gpu_bayesian.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ This is the Monte Carlo approach and it converges to the correct answer by

However, the [Koopman expectation](https://arxiv.org/abs/2008.08737) can converge
with much fewer points, allowing the use of higher order quadrature methods to
converge exponentially faster in many cases. To use the Koopman expectation
functionality provided by [SciMLExpectations.jl](https://github.com/SciML/SciMLExpectations.jl),
converge exponentially faster in many cases. To use the Koopman expectation,
we first need to define our observable function `g`. This function designates the
thing about the solution we wish to calculate the expectation of. Thus for our
question "what is the expected value of `x`at time `t=10`?", we would simply use:
Expand Down Expand Up @@ -172,7 +171,7 @@ Are we done? No, we need to add some GPUs! As mentioned earlier, probability
calculations can take quite a bit of ODE solves, so let's parallelize across
the parameters. [DiffEqGPU.jl](https://github.com/SciML/DiffEqGPU.jl) allows you
to GPU-parallelize across parameters by using the
[Ensemble interface](https://diffeq.sciml.ai/stable/features/ensemble/). Note that
[Ensemble interface](https://docs.sciml.ai/DiffEqDocs/stable/features/ensemble/). Note that
you do not have to do any of the heavy lifting: all of the conversion to GPU
kernels is done automaticaly by simply specifying `EnsembleGPUArray` as the
ensembling method. For example:
Expand Down
4 changes: 2 additions & 2 deletions docs/src/tutorials/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@ centralmoment(5, g, prob, u0_dist, p, Koopman(), Tsit5(),
```

## Batch-Mode
It is also possible to solve the various simulations in parallel by using the `batch` kwarg and a batch-mode supported quadrature algorithm via the `quadalg` kwarg. To view the list of batch compatible quadrature algorithms, refer to [Quadrature.jl](https://github.com/SciML/Quadrature.jl). Note: Batch-mode operation is built on top of DifferentialEquation.jl's `EnsembleProblem`. See the [EnsembleProblem documentation](https://diffeq.sciml.ai/stable/features/ensemble/) for additional options.
It is also possible to solve the various simulations in parallel by using the `batch` kwarg and a batch-mode supported quadrature algorithm via the `quadalg` kwarg. To view the list of batch compatible quadrature algorithms, refer to [Integrals.jl](https://docs.sciml.ai/Integrals/stable/). Note: Batch-mode operation is built on top of DifferentialEquation.jl's `EnsembleProblem`. See the [EnsembleProblem documentation](https://docs.sciml.ai/DiffEqDocs/stable/features/ensemble/) for additional options.

The default quadtrature algorithm used by `expectation()` does not support batch-mode evaluation. So, we first load dependencies for additional quadrature algorithms

```julia
using Quadrature, Cuba
using Integrals, Cuba
```

We then solve our expectation as before using a `batch=10` multi-thread parallelization via `EnsembleThreads()` of Cuba's SUAVE algorithm. However, in this case we introduce additional uncertainty in the model parameter.
Expand Down

0 comments on commit 41d014f

Please sign in to comment.