Emulators
CalibrateEmulateSample.Emulators.Emulator — Typestruct 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 dataencoded_io_pairs::EnsembleKalmanProcesses.DataContainers.PairedDataContainer{FT} where FT<:AbstractFloat: encoded training dataencoder_schedule::AbstractVector: Store of the pipeline to encode (/decode) the data
CalibrateEmulateSample.Emulators.optimize_hyperparameters! — Methodoptimize_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
CalibrateEmulateSample.Emulators.Emulator — MethodEmulator(
machine_learning_tool::CalibrateEmulateSample.Emulators.MachineLearningTool,
input_output_pairs::EnsembleKalmanProcesses.DataContainers.PairedDataContainer{FT<:AbstractFloat};
encoder_schedule,
encoder_kwargs,
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 aPairedDataContainer
Keyword Arguments
encoder_schedule[=nothing]: the schedule of data encoding/decoding. This will be passed into the methodcreate_encoder_scheduleinternally.nothingsets sets a default schedule[(decorrelate_sample_cov(), "in_and_out")], or[(decorrelate_sample_cov(), "in"), (decorrelate_structure_mat(), "out")]if anencoder_kwargshas a key:obs_noise_cov. Pass[]for no encoding.encoder_kwargs[=NamedTuple()]: a Dict or NamedTuple with keyword arguments to be passed toinitialize_and_encode_with_schedule!
Other keywords are passed to the machine learning tool initialization
GaussianProcesses.predict — Functionpredict(
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.
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).
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.
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]
CalibrateEmulateSample.Utilities.encode_data — Functionencode_data(
cc::CalibrateEmulateSample.Utilities.CanonicalCorrelation,
data::AbstractMatrix
) -> Any
Apply the CanonicalCorrelation encoder, on a columns-are-data matrix
encode_data(
dd::CalibrateEmulateSample.Utilities.Decorrelator,
data::AbstractMatrix
) -> Any
Apply the Decorrelator encoder, on a columns-are-data matrix
encode_data(
es::CalibrateEmulateSample.Utilities.ElementwiseScaler,
data::AbstractMatrix
) -> AbstractMatrix
Apply the ElementwiseScaler encoder, on a columns-are-data matrix
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.
CalibrateEmulateSample.Utilities.decode_data — Functiondecode_data(
cc::CalibrateEmulateSample.Utilities.CanonicalCorrelation,
data::AbstractMatrix
) -> Any
Apply the CanonicalCorrelation decoder, on a columns-are-data matrix
decode_data(
dd::CalibrateEmulateSample.Utilities.Decorrelator,
data::AbstractMatrix
) -> Any
Apply the Decorrelator decoder, on a columns-are-data matrix
decode_data(
es::CalibrateEmulateSample.Utilities.ElementwiseScaler,
data::AbstractMatrix
) -> AbstractMatrix
Apply the ElementwiseScaler decoder, on a columns-are-data matrix
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.
CalibrateEmulateSample.Utilities.encode_structure_matrix — Functionencode_structure_matrix(
cc::CalibrateEmulateSample.Utilities.CanonicalCorrelation,
structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any
Apply the CanonicalCorrelation encoder to a provided structure matrix
encode_structure_matrix(
dd::CalibrateEmulateSample.Utilities.Decorrelator,
structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any
Apply the Decorrelator encoder to a provided structure matrix
encode_structure_matrix(
es::CalibrateEmulateSample.Utilities.ElementwiseScaler,
structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any
Apply the ElementwiseScaler encoder to a provided structure matrix
encode_structure_matrix(
emulator::CalibrateEmulateSample.Emulators.Emulator,
structure_mat::Union{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.
CalibrateEmulateSample.Utilities.decode_structure_matrix — Functiondecode_structure_matrix(
cc::CalibrateEmulateSample.Utilities.CanonicalCorrelation,
enc_structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any
Apply the CanonicalCorrelation decoder to a provided structure matrix
decode_structure_matrix(
dd::CalibrateEmulateSample.Utilities.Decorrelator,
enc_structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any
Apply the Decorrelator decoder to a provided structure matrix
decode_structure_matrix(
es::CalibrateEmulateSample.Utilities.ElementwiseScaler,
enc_structure_matrix::Union{LinearAlgebra.UniformScaling, AbstractMatrix}
) -> Any
Apply the ElementwiseScaler decoder to a provided structure matrix
decode_structure_matrix(
emulator::CalibrateEmulateSample.Emulators.Emulator,
structure_mat::Union{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.