Statistics, error conditions and ensemble defaults
Source:R/scimlbase-interface.R
scimlbase_stats.RdDEStats() and NLStats() are the statistics objects of differential
equation and nonlinear solutions (sol$stats holds the same counters).
FunctionArgumentsError(nargs), TooFewArgumentsError(nargs),
TooManyArgumentsError(nargs) and KeywordArgError(kw) are the condition
objects SciMLBase signals for functions with the wrong signature or
unknown keywords; numargs(f) is the number of arguments of f.
DEFAULT_PROB_FUNC, DEFAULT_OUTPUT_FUNC and DEFAULT_REDUCTION are
the defaults of EnsembleProblem(); generate_sim_seeds(n) draws n
seeds and default_rng_func(seed) seeds the generator.
WeightedEnsembleProblem(probs, weights) combines several ensemble
problems with weights that sum to one (a mixture of ensembles); solve()
returns a WeightedEnsembleSolution with the solution of each ensemble in
u and the weights in weights.
calculate_ensemble_errors(sim) summarizes calculate_solution_errors()
over an ensemble.
Usage
DEStats(nf = 0L, njacs = 0L, nsolve = 0L, nw = 0L, naccept = 0L, nreject = 0L)
NLStats(nf = 0L, njacs = 0L, nfactorizations = 0L, nsolve = 0L, nsteps = 0L)
FunctionArgumentsError(nargs)
TooFewArgumentsError(nargs)
TooManyArgumentsError(nargs)
KeywordArgError(kw)
numargs(f)
DEFAULT_PROB_FUNC(prob, i, repeat_)
DEFAULT_OUTPUT_FUNC(sol, i)
DEFAULT_REDUCTION(u, data, I)
generate_sim_seeds(n, seed = NULL)
default_rng_func(seed)
WeightedEnsembleProblem(probs, weights)
WeightedEnsembleSolution(u, weights)
calculate_ensemble_errors(sim, ...)Arguments
- nf, njacs, nfactorizations, nsolve, nsteps, naccept, nreject, nw
Counters.
- nargs, kw
Number of arguments or keyword name.
- f
A function.
- prob, i, repeat_, sol, u, data, I
Arguments of the ensemble functions.
- n
Number of seeds.
- seed
A seed.
- probs
A list of ensemble problems.
- weights
Their weights.
- sim
An ensemble solution.
- ...
Options.