GaussianProcess

CalibrateEmulateSample.Emulators.GaussianProcessesPackageType
abstract type GaussianProcessesPackage

Type to dispatch which GP package to use:

  • GPJL for GaussianProcesses.jl, [julia - gradient-free only]
  • SKLPy for the ScikitLearn GaussianProcessRegressor, [python - gradient-free]
  • AGPJL for AbstractGPs.jl, [julia - ForwardDiff compatible]
  • SKLJL (deprecated) — alias for SKLPy; will be removed in a future release.
source
CalibrateEmulateSample.Emulators.GaussianProcessType
struct GaussianProcess{GPPackage, FT, VV<:(AbstractVector)} <: CalibrateEmulateSample.Emulators.MachineLearningTool

Structure holding training input and the fitted Gaussian process regression models.

Fields

  • models::Vector{Union{Nothing, PythonCall.Py, AbstractGPs.PosteriorGP, GaussianProcesses.GPE}}: The Gaussian Process (GP) Regression model(s) that are fitted to the given input-data pairs.

  • kernel::Union{Nothing, var"#s700", var"#s699", var"#s698"} where {var"#s700"<:GaussianProcesses.Kernel, var"#s699"<:PythonCall.Py, var"#s698"<:KernelFunctions.Kernel}: Kernel object.

  • noise_learn::Bool: Learn the noise with the White Noise kernel explicitly?

  • alg_reg_noise::Any: Additional observational or regularization noise in used in GP algorithms

  • prediction_type::CalibrateEmulateSample.Emulators.PredictionType: [Deprecated - use add_obs_noise_cov kwarg when calling predict(] Prediction type (y to predict the data, f to predict the latent function).

  • regularization::AbstractVector: Regularization vector for each output dimension (based on algregnoise

source
CalibrateEmulateSample.Emulators.GaussianProcessMethod
GaussianProcess(
    package::AbstractFloat;
    kernel,
    noise_learn,
    alg_reg_noise,
    prediction_type
)

Construct a GaussianProcess for the chosen backend package.

Arguments

  • package: one of GPJL, SKLPy, or AGPJL to select the GP backend. SKLJL is a deprecated alias for SKLPy.
  • kernel: kernel object compatible with the chosen backend. Defaults to a squared-exponential kernel.
  • noise_learn: if true, learns additive white noise via the kernel. Default true.
  • alg_reg_noise: small regularisation added by the fitting algorithm when noise_learn = true. Default 1e-3.
  • prediction_type: YType() (predict observations) or FType() (predict latent function). Default YType().
source
CalibrateEmulateSample.Emulators.build_models!Method
build_models!(
    gp::CalibrateEmulateSample.Emulators.GaussianProcess{CalibrateEmulateSample.Emulators.GPJL},
    input_output_pairs::EnsembleKalmanProcesses.DataContainers.PairedDataContainer{FT<:AbstractFloat},
    input_structure_mats,
    output_structure_mats;
    kwargs...
) -> Any

Method to build Gaussian process models based on the package.

source
CalibrateEmulateSample.Emulators.optimize_hyperparameters!Method
optimize_hyperparameters!(
    gp::CalibrateEmulateSample.Emulators.GaussianProcess{CalibrateEmulateSample.Emulators.GPJL},
    args...;
    kwargs...
)

Optimize Gaussian process hyperparameters using in-build package method.

Warning: if one uses GPJL() and wishes to modify positional arguments. The first positional argument must be the Optim method (default LBGFS()).

source
GaussianProcesses.predictMethod
predict(
    gp::CalibrateEmulateSample.Emulators.GaussianProcess{CalibrateEmulateSample.Emulators.GPJL},
    new_inputs::AbstractArray{FT<:AbstractFloat, 2};
    add_obs_noise_cov,
    mlt_kwargs...
) -> Tuple{Any, Any}

Predict means and covariances in decorrelated output space using Gaussian process models. The use of stored FType and YType to control this method is deprecated, the return covariance is now determined by the predict( kwarg add_obs_noise_cov

source
GaussianProcesses.get_paramsFunction
get_params(
    gp::CalibrateEmulateSample.Emulators.GaussianProcess{CalibrateEmulateSample.Emulators.GPJL}
) -> Vector

Return the flattened kernel hyperparameters from each model in gp. Extends the GaussianProcesses.jl method for the GPJL backend.

source
GaussianProcesses.get_param_namesFunction
get_param_names(
    gp::CalibrateEmulateSample.Emulators.GaussianProcess{CalibrateEmulateSample.Emulators.GPJL}
) -> Vector

Return the flattened names of kernel hyperparameters for each model in gp. Extends the GaussianProcesses.jl method for the GPJL backend.

source