EFTT

EFTT(self, bases: ApproxBases, tt: TT, options: EFTTOptions | None = None)

An extended functional tensor train, defined on \([-1, 1]^{d}\).

Parameters

bases : ApproxBases

A set of basis functions for each dimension of the EFTT.

tt : TT

A tensor train object.

options : EFTTOptions | None = None

A set of tuning parameters used during the construction of the EFTT.

Attributes

num_eval : int

The number of function evaluations required to construct the EFTT.

Methods

Name Description
approximate Constructs a FTT approximation to a target function.
eval Evaluates the FTT.

approximate

EFTT.approximate(
    target_func: Callable[[Tensor], Tensor],
    reference: Reference | None = None,
)

Constructs a FTT approximation to a target function.

Parameters

target_func : Callable[[Tensor], Tensor]

The target function, \(f : [-1, 1]^{d} \rightarrow \mathbb{R}\).

reference : Reference | None = None

The reference measure. If provided, this will be used to generate the samples to build the fibre matrix bases and generate the initial index sets for the underlying TT. Otherwise, the samples will be drawn uniformly.

eval

EFTT.eval(ls: Tensor, direction: Direction | None = None)

Evaluates the FTT.

Returns the functional tensor train approximation to the target function for either the first or last \(k\) variables, for a set of points mapped to the domain of the basis functions.

Parameters

ls : Tensor

An \(n \times d\) matrix containing a set of samples mapped to the domain of the FTT basis functions.

direction : Direction | None = None

The direction in which to iterate over the cores.

Returns

Gs_prod : Tensor

An \(n \times n_{k}\) matrix, where each row contains the product of the first or last (depending on direction) \(k\) tensor cores evaluated at the corresponding sample in ls.