pub enum BasisFunctionType {
Power(usize),
Hermite(usize),
Chebyshev(usize),
Laguerre(usize),
}Expand description
Polynomial Basis Functions for Regression
Used to approximate the conditional expectation $\mathbb{E}[Y_{t+1} | X_t]$ via Least Squares Monte Carlo.
Variants§
Power(usize)
Standard polynomials: $1, x, x^2, \dots$
Hermite(usize)
Probabilists’ Hermite polynomials: $He_n(x)$. Orthogonal wrt Gaussian measure. Best for Brownian Motion.
Chebyshev(usize)
Chebyshev polynomials (1st kind): $T_n(x)$. Minimax approximation on $[-1, 1]$.
Laguerre(usize)
Laguerre polynomials: $L_n(x)$. Orthogonal for exponential weight $e^{-x}$ on $[0, \infty)$.
Implementations§
Source§impl BasisFunctionType
impl BasisFunctionType
Sourcepub fn to_basis<const N: usize>(&self) -> PolynomialBasis
pub fn to_basis<const N: usize>(&self) -> PolynomialBasis
Converts the enum to the new Basis trait object (boxed) or specific struct.
Trait Implementations§
Source§impl Clone for BasisFunctionType
impl Clone for BasisFunctionType
Source§fn clone(&self) -> BasisFunctionType
fn clone(&self) -> BasisFunctionType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BasisFunctionType
Auto Trait Implementations§
impl Freeze for BasisFunctionType
impl RefUnwindSafe for BasisFunctionType
impl Send for BasisFunctionType
impl Sync for BasisFunctionType
impl Unpin for BasisFunctionType
impl UnsafeUnpin for BasisFunctionType
impl UnwindSafe for BasisFunctionType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more