darsia.KernelInterpolation#

class KernelInterpolation(kernel, supports=None, values=None, regularization=0.0, deduplicate=True)[source]#

Bases: Model

General kernel-based interpolation.

Setup of the kernel-based interpolation.

Parameters:
kerneldarsia.BaseKernel

Kernel.

supportsnp.ndarray

Support points.

valuesnp.ndarray

Goal points.

regularizationfloat

Ridge term added to the diagonal of the kernel matrix. Zero means exact interpolation; positive values stabilize close supports.

deduplicatebool

Whether to remove duplicate supports (and their values) before solving. Without removal, duplicate supports need a positive regularization (or equal values) to be solvable.

Raises:
AssertionError

If the input data is not compatible, i.e., the number of supports and values does not match.

Methods

calibrate()

Calibration routine of model.

setup_kernel_problem()

Setup of linear kernel problem.

update([kernel, supports, values, append])

Update kernel and interpolation weights.

update_interpolation()

Update interpolation weights.

update_kernel(kernel)

Update kernel.

update_model_parameters(parameters[, dofs])

Attributes

kernel

Kernel.

regularization

Ridge term of the kernel matrix.

deduplicate

Flag for removing duplicate supports.

supports

Support points.

values

Goal points.

num_supports

Number of support points.

interpolation_weights

Interpolation weights.

setup_kernel_problem()[source]#

Setup of linear kernel problem.

update(kernel=None, supports=None, values=None, append=False)[source]#

Update kernel and interpolation weights.

Parameters:
kerneldarsia.BaseKernel, optional

Kernel.

supportsnp.ndarray, optional

Support points.

valuesnp.ndarray, optional

Goal points.

appendbool

Flag to append new data to existing data.

update_interpolation()[source]#

Update interpolation weights.

Raises:
AssertionError

If the input data is not compatible, i.e., the number of supports and values does not match.

update_kernel(kernel)[source]#

Update kernel.

Parameters:
kerneldarsia.BaseKernel

Kernel.

deduplicate#

Flag for removing duplicate supports.

interpolation_weights#

Interpolation weights.

kernel#

Kernel.

num_supports#

Number of support points.

regularization#

Ridge term of the kernel matrix.

supports#

Support points.

values#

Goal points.