CustomKL#

class cuqi.geometry.CustomKL(grid, mean=0, std=1.0, cov_func=None, trunc_term=None, axis_labels=None, **kwargs)#

A class representation of a random field in which a truncated KL expansion is computed from a given covariance function.

Parameters:
  • grid (array-like) – One dimensional grid on which the random field is defined.

  • cov_func (callable) – A covariance function that takes two variables and returns the covariance between them.

  • mean (float, default 0.0) – The mean of the random field.

  • std (float, default 1.0) – The standard deviation of the random field.

  • trunc_term (int, default 20% of the number of grid points) – The number of terms to truncate the KL expansion at.

__init__(grid, mean=0, std=1.0, cov_func=None, trunc_term=None, axis_labels=None, **kwargs)#

Methods

__init__(grid[, mean, std, cov_func, ...])

fun2par(funvals)

The function to parameter map used to map function values back to parameters, if available.

fun2vec(funvals)

Maps function values to a vector representation of the function values, if available.

par2fun(p)

The parameter to function map used to map parameters to function values in e.g. plotting.

plot(values[, is_par, plot_par])

Plots a function over the set defined by the geometry object.

plot_envelope(lo_values, hi_values[, ...])

Plots an envelope from lower and upper bounds over the set defined by the geometry object.

vec2fun(funvec)

Maps function vector representation, if available, to function values.

Attributes

eigval

eigvec

fun_dim

The dimension of the geometry (function space).

fun_is_array

Flag to indicate whether the function value is an array.

fun_shape

The shape of the geometry (function space).

funvec_dim

The dimension of the geometry (dimension of the vector representation of the function value).

funvec_shape

The shape of the geometry (shape of the vector representation of the function value).

grid

mean

par_dim

The dimension of the geometry (parameter space).

par_shape

The shape of the parameter space

std

trunc_term

variables