seemps.analysis.expansion.OrthogonalExpansion#

class seemps.analysis.expansion.OrthogonalExpansion#

Bases: PolynomialExpansion, ABC

Polynomial expansion in an orthogonal polynomial basis.

Represents expansions in families such as Chebyshev, Legendre, Hermite, or Gegenbauer, where the recurrence coefficients are determined by orthogonality relations on the canonical domain.

classmethod estimate_order(func: Callable[[ndarray[tuple[Any, ...], dtype[_ScalarT]]], float], start: float, stop: float, tol: float = 100 * float(np.finfo(np.float64).eps), initial_order: int = 2, max_order: int = 2**12, **kwargs) int[source]#

Estimate order of orthogonal polynomial expansion.

Relies on cls.project to build the coefficients, iterating until the absolute value of the next coefficient lays below the given tolerance.

abstractmethod classmethod project(func: Callable[[ndarray[tuple[Any, ...], dtype[_ScalarT]]], float], start: float, stop: float, order: int | None = None) PolynomialExpansion[source]#

Project func defined on (start, stop) onto the orthogonal polynomial basis up to the given order.