Emulators

CalibrateEmulateSample.Emulators.EmulatorType
struct Emulator{FT<:AbstractFloat, VV<:(AbstractVector)}

Structure used to represent a general emulator, independently of the algorithm used.

Fields

  • machine_learning_tool::CalibrateEmulateSample.Emulators.MachineLearningTool: Machine learning tool, defined as a struct of type MachineLearningTool.

  • io_pairs::EnsembleKalmanProcesses.DataContainers.PairedDataContainer{FT} where FT<:AbstractFloat: original training data

  • encoded_io_pairs::EnsembleKalmanProcesses.DataContainers.PairedDataContainer{FT} where FT<:AbstractFloat: encoded training data

  • encoder_schedule::AbstractVector: Store of the pipeline to encode (/decode) the data

source
CalibrateEmulateSample.Emulators.optimize_hyperparameters!Method
optimize_hyperparameters!(
    emulator::CalibrateEmulateSample.Emulators.Emulator{FT<:AbstractFloat},
    args...;
    kwargs...
) -> Any

Optimizes the hyperparameters in the machine learning tool. Note that some machine learning packages train hyperparameters on construction so this call is not necessary

source
CalibrateEmulateSample.Emulators.EmulatorMethod
Emulator(
    machine_learning_tool::CalibrateEmulateSample.Emulators.MachineLearningTool,
    input_output_pairs::EnsembleKalmanProcesses.DataContainers.PairedDataContainer{FT<:AbstractFloat};
    encoder_schedule,
    input_structure_matrix,
    output_structure_matrix,
    obs_noise_cov,
    mlt_kwargs...
) -> CalibrateEmulateSample.Emulators.Emulator{FT, Vector{Any}} where FT<:AbstractFloat

Constructor of the Emulator object,

Positional Arguments

  • machine_learning_tool: the selected machine learning tool object (e.g. Gaussian process / Random feature interface)
  • input_output_pairs: the paired input-output data points stored in a PairedDataContainer

Keyword Arguments

  • encoder_schedule[=nothing]: the schedule of data encoding/decoding. This will be passed into the method create_encoder_schedule internally. nothing sets sets a default schedule (decorrelate_samples_cov(), "in_and_out"). Pass [] for no encoding.
  • input_structure_matrix[=nothing]: Some encoders make use of an input structure (e.g., the prior covariance matrix). Particularly useful for few samples.
  • output_structure_matrix [=nothing] Some encoders make use of an input structure (e.g., the prior covariance matrix). Particularly useful for few samples.

Other keywords are passed to the machine learning tool initialization

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

Predict means and covariances in decorrelated output space using Gaussian process models.

source
predict(
    srfi::CalibrateEmulateSample.Emulators.ScalarRandomFeatureInterface,
    new_inputs::AbstractMatrix;
    multithread
) -> Tuple{Any, Any}

Prediction of emulator mean at new inputs (passed in as columns in a matrix), and a prediction of the total covariance at new inputs equal to (emulator covariance + noise covariance).

source
predict(
    vrfi::CalibrateEmulateSample.Emulators.VectorRandomFeatureInterface,
    new_inputs::AbstractMatrix
) -> Tuple{Any, Any}

Prediction of data observation (not latent function) at new inputs (passed in as columns in a matrix). That is, we add the observational noise into predictions.

source
predict(
    emulator::CalibrateEmulateSample.Emulators.Emulator{FT<:AbstractFloat},
    new_inputs::AbstractMatrix;
    transform_to_real,
    mlt_kwargs...
) -> Tuple{Any, Any}

Makes a prediction using the emulator on new inputs (each new inputs given as data columns). Default is to predict in the decorrelated space.

Return type of N inputs: (in the output space)

  • 1-D: mean [1 x N], cov [1 x N]
  • p-D: mean [p x N], cov N x [p x p]
source
CalibrateEmulateSample.Utilities.encode_dataFunction
encode_data(
    cc::CalibrateEmulateSample.Utilities.CanonicalCorrelation,
    data::AbstractMatrix
) -> Any

Apply the CanonicalCorrelation encoder, on a columns-are-data matrix

source
encode_data(
    dd::CalibrateEmulateSample.Utilities.Decorrelator,
    data::AbstractMatrix
) -> Any

Apply the Decorrelator encoder, on a columns-are-data matrix

source
encode_data(
    es::CalibrateEmulateSample.Utilities.ElementwiseScaler,
    data::AbstractMatrix
) -> AbstractMatrix

Apply the ElementwiseScaler encoder, on a columns-are-data matrix

source
encode_data(
    emulator::CalibrateEmulateSample.Emulators.Emulator,
    data::Union{EnsembleKalmanProcesses.DataContainers.DataContainer, AbstractMatrix},
    in_or_out::AbstractString
) -> Union{EnsembleKalmanProcesses.DataContainers.DataContainer, AbstractMatrix{FT} where FT<:Real}

Encode the new data (a DataContainer, or matrix where data are columns) representing inputs ("in") or outputs ("out"). with the stored and initialized encoder schedule.

source
CalibrateEmulateSample.Utilities.decode_dataFunction
decode_data(
    cc::CalibrateEmulateSample.Utilities.CanonicalCorrelation,
    data::AbstractMatrix
) -> Any

Apply the CanonicalCorrelation decoder, on a columns-are-data matrix

source
decode_data(
    dd::CalibrateEmulateSample.Utilities.Decorrelator,
    data::AbstractMatrix
) -> Any

Apply the Decorrelator decoder, on a columns-are-data matrix

source
decode_data(
    es::CalibrateEmulateSample.Utilities.ElementwiseScaler,
    data::AbstractMatrix
) -> AbstractMatrix

Apply the ElementwiseScaler decoder, on a columns-are-data matrix

source
decode_data(
    emulator::CalibrateEmulateSample.Emulators.Emulator,
    data::Union{EnsembleKalmanProcesses.DataContainers.DataContainer, AbstractMatrix},
    in_or_out::AbstractString
) -> Union{EnsembleKalmanProcesses.DataContainers.DataContainer, AbstractMatrix{FT} where FT<:Real}

Decode the new data (a DataContainer, or matrix where data are columns) representing inputs ("in") or outputs ("out"). with the stored and initialized encoder schedule.

source
CalibrateEmulateSample.Utilities.encode_structure_matrixFunction
encode_structure_matrix(
    cc::CalibrateEmulateSample.Utilities.CanonicalCorrelation,
    structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any

Apply the CanonicalCorrelation encoder to a provided structure matrix

source
encode_structure_matrix(
    dd::CalibrateEmulateSample.Utilities.Decorrelator,
    structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any

Apply the Decorrelator encoder to a provided structure matrix

source
encode_structure_matrix(
    es::CalibrateEmulateSample.Utilities.ElementwiseScaler,
    structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any

Apply the ElementwiseScaler encoder to a provided structure matrix

source
encode_structure_matrix(
    emulator::CalibrateEmulateSample.Emulators.Emulator,
    structure_mat::Union{Nothing, LinearAlgebra.UniformScaling, AbstractMatrix},
    in_or_out::AbstractString
) -> Any

Encode a new structure matrix in the input space ("in") or output space ("out"). with the stored and initialized encoder schedule.

source
CalibrateEmulateSample.Utilities.decode_structure_matrixFunction
decode_structure_matrix(
    cc::CalibrateEmulateSample.Utilities.CanonicalCorrelation,
    enc_structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any

Apply the CanonicalCorrelation decoder to a provided structure matrix

source
decode_structure_matrix(
    dd::CalibrateEmulateSample.Utilities.Decorrelator,
    enc_structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any

Apply the Decorrelator decoder to a provided structure matrix

source
decode_structure_matrix(
    es::CalibrateEmulateSample.Utilities.ElementwiseScaler,
    enc_structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any

Apply the ElementwiseScaler decoder to a provided structure matrix

source
decode_structure_matrix(
    emulator::CalibrateEmulateSample.Emulators.Emulator,
    structure_mat::Union{Nothing, LinearAlgebra.UniformScaling, AbstractMatrix},
    in_or_out::AbstractString
) -> Any

Decode a new structure matrix in the input space ("in") or output space ("out"). with the stored and initialized encoder schedule.

source