Utilities

AutoGP.Callbacks

AutoGP.Callbacks.make_smc_callbackMethod
make_smc_callback(fn::Function, model::AutoGP.GPModel; kwargs...)

Convert fn into a callback for AutoGP.fit_smc!(model, ...).

The function fn must have a signature of the form fn(; [<opt>,] kw...), where kw... is a varargs specifier and <opt> denotes a (possibly empty) collection of required and optional keyword arguments.

For example fn(; a, b=2, kw...) is valid because fn takes no named arguments and the varargs specifier kw... is present. If fn includes named keyword arguments (i.e. a and b), then all required keyword arguments (i.e., a) must be provided in the call to make_smc_callback and optional keyword arguments (i.e., b) may be provided, as shown in the examples below.

model = AutoGP.GPModel(...)
fn = (; a, b=2, kw...) -> ...
make_smc_callback(fn, model; a=2)       # valid, `a` specified, `b` optional.
make_smc_callback(fn, model; a=1, b=2)  # valid, `a` and `b` are specified.
make_smc_callback(fn, model)            # invalid, `a` required but not specified.
make_smc_callback(fn, model; b=2)       # invalid, `a` required but not specified.

The callback return by make_smc_callback is guaranteed to receive in its varargs (which we called kw) an "SMC" state which. The following variables can be accessed in the body of fn by indexing kw:

  • kw[:step]::Integer: Current SMC step.
  • kw[:model]::AutoGP.GPModel: Inferred model at current SMC step.
  • kw[:ds_next]::AutoGP.IndexType: Future ds (time points) to be observed in later SMC rounds.
  • kw[:y_next]::Vector{<:Real}: Future y (observations) to be observed in later SMC rounds.
  • kw[:rejuvenated]::Bool: Did rejuvenation occur at current step?
  • kw[:resampled]:Bool: Did resampling occur at current step?
  • kw[:elapsed]::Float64: Wall-clock inference runtime elapsed.
  • kw[:verbose]::Bool: Verbose setting.
  • kw[:schedule]::Vector{Integer}: The SMC data annealing schedule.
  • kw[:permutation]::Vector{Integer}: Indexes used to shuffle (model.ds, model.y).
source

AutoGP.Schedule

AutoGP.Schedule.logarithmic_scheduleMethod
logarithmic_schedule(n::Integer, base::Integer, start::Integer)

The first step adds start observations (must be positive). At step i, start⋅baseⁱ new observations are added.

source

AutoGP.Transforms