sequence_transformer module¶
Sequence transformer methods.
- class gemseo.algos.sequence_transformer.sequence_transformer.SequenceTransformer[source]
Bases:
object
A vector sequence transformer for fixed-point iteration method.
For any function \(G : \mathbb{R}^n \rightarrow \mathbb{R}^n\), the fixed point iteration method computes the sequence \(x_{n+1} = G(x_n)\), whih is exepcted to converge towards a fixed point of \(G\).
A sequence transformer is a function \(f : \mathbb{R}^n \rightarrow \mathbb{R}^n\) so that the new iterate is instead computed as .. math:
x_{n+1}' = f(G, x_n, \dots, x_{n-k}, G(x_n)),
for a given \(k \geq 0\).
The transformed sequence is expected to exhibit faster convergence and/or better numerical stability.
- clear()[source]
Clear the iterates.
- Return type:
None
- compute_transformed_iterate(current_iterate, next_iterate)[source]
Compute the next transformed iterate.
- Parameters:
current_iterate (NDArray) – The current iterate \(x_n\).
next_iterate (NDArray) – The new iterate \(G(x_n)\).
- Returns:
The next transformed iterate \(x_{n+1}\).
- Return type:
NDArray