Skip to content

Commit

Permalink
docs: fix rendering of Bayesian PINN docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
sathvikbhagavan committed Mar 15, 2024
1 parent fe39bcc commit bfb159c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
34 changes: 18 additions & 16 deletions src/BPINN_ode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,19 @@ function BNNODE(chain, Kernel = HMC; strategy = nothing, draw_samples = 2000,
end

"""
Contains ahmc_bayesian_pinn_ode() function output:
1> a MCMCChains.jl chain object for sampled parameters
2> The set of all sampled parameters
3> statistics like:
> n_steps
> acceptance_rate
> log_density
> hamiltonian_energy
> hamiltonian_energy_error
> numerical_error
> step_size
> nom_step_size
Contains `ahmc_bayesian_pinn_ode()` function output:
1. A MCMCChains.jl chain object for sampled parameters.
2. The set of all sampled parameters.
3. Statistics like:
- n_steps
- acceptance_rate
- log_density
- hamiltonian_energy
- hamiltonian_energy_error
- numerical_error
- step_size
- nom_step_size
"""
struct BPINNstats{MC, S, ST}
mcmc_chain::MC
Expand All @@ -143,10 +144,11 @@ struct BPINNstats{MC, S, ST}
end

"""
BPINN Solution contains the original solution from AdvancedHMC.jl sampling(BPINNstats contains fields related to that)
> ensemblesol is the Probabilistic Estimate(MonteCarloMeasurements.jl Particles type) of Ensemble solution from All Neural Network's(made using all sampled parameters) output's.
> estimated_nn_params - Probabilistic Estimate of NN params from sampled weights,biases
> estimated_de_params - Probabilistic Estimate of DE params from sampled unknown DE parameters
BPINN Solution contains the original solution from AdvancedHMC.jl sampling (BPINNstats contains fields related to that).
1. `ensemblesol` is the Probabilistic Estimate (MonteCarloMeasurements.jl Particles type) of Ensemble solution from All Neural Network's (made using all sampled parameters) output's.
2. `estimated_nn_params` - Probabilistic Estimate of NN params from sampled weights, biases.
3. `estimated_de_params` - Probabilistic Estimate of DE params from sampled unknown DE parameters.
"""
struct BPINNsolution{O <: BPINNstats, E, NP, OP, P}
original::O
Expand Down
4 changes: 2 additions & 2 deletions src/advancedHMC_MCMC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ end
!!! warn
Note that ahmc_bayesian_pinn_ode() only supports ODEs which are written in the out-of-place form, i.e.
`du = f(u,p,t)`, and not `f(du,u,p,t)`. If not declared out-of-place, then the ahmc_bayesian_pinn_ode()
Note that `ahmc_bayesian_pinn_ode()` only supports ODEs which are written in the out-of-place form, i.e.
`du = f(u,p,t)`, and not `f(du,u,p,t)`. If not declared out-of-place, then the `ahmc_bayesian_pinn_ode()`
will exit with an error.
## Example
Expand Down

0 comments on commit bfb159c

Please sign in to comment.