Skip to main content

FittedTerm

Enum FittedTerm 

Source
pub enum FittedTerm {
    Intercept {
        range: Range<usize>,
        coefficient: String,
    },
    Linear {
        col: Col<f64>,
        range: Range<usize>,
        coefficient: String,
    },
    Offset {
        col: Col<f64>,
    },
    Indicator {
        col: Col<bool>,
        range: Range<usize>,
        coefficient: String,
    },
    Factor {
        col: Col<Category>,
        range: Range<usize>,
        levels: Vec<String>,
        baseline: String,
        coefficients: Vec<String>,
    },
    Interaction {
        left: Col<f64>,
        right: Col<f64>,
        range: Range<usize>,
        coefficient: String,
    },
    PSpline {
        col: Col<f64>,
        range: Range<usize>,
        basis: OpenUniformSplineBasis,
        lambda: f64,
        penalty_order: usize,
        coefficients: Vec<String>,
    },
    CyclicPSpline {
        col: Col<f64>,
        range: Range<usize>,
        spec: CyclicSplineSpec,
        lambda: f64,
        penalty_order: usize,
        coefficients: Vec<String>,
    },
    Fourier {
        col: Col<f64>,
        range: Range<usize>,
        period: f64,
        order: usize,
        include_intercept: bool,
        coefficients: Vec<String>,
    },
    TensorPSpline {
        left: Col<f64>,
        right: Col<f64>,
        range: Range<usize>,
        left_basis: OpenUniformSplineBasis,
        right_basis: OpenUniformSplineBasis,
        coefficients: Vec<String>,
    },
    Monotone {
        col: Col<f64>,
        range: Range<usize>,
        basis: ISplineBasis,
        direction: MonotoneDirection,
        coefficients: Vec<String>,
    },
}
Expand description

Fitted term metadata reusable for prediction.

Variants§

§

Intercept

Intercept term.

Fields

§range: Range<usize>

Local coefficient range inside the parameter block.

§coefficient: String

Coefficient name.

§

Linear

Linear term.

Fields

§col: Col<f64>

Source column.

§range: Range<usize>

Local coefficient range inside the parameter block.

§coefficient: String

Coefficient name.

§

Offset

Numeric offset term.

Fields

§col: Col<f64>

Source column.

§

Indicator

Boolean indicator term.

Fields

§col: Col<bool>

Source column.

§range: Range<usize>

Local coefficient range inside the parameter block.

§coefficient: String

Coefficient name.

§

Factor

Treatment-coded categorical factor.

Fields

§col: Col<Category>

Source column.

§range: Range<usize>

Local coefficient range inside the parameter block.

§levels: Vec<String>

Sorted training levels.

§baseline: String

Baseline level.

§coefficients: Vec<String>

Coefficient names.

§

Interaction

Numeric product interaction.

Fields

§left: Col<f64>

Left source column.

§right: Col<f64>

Right source column.

§range: Range<usize>

Local coefficient range inside the parameter block.

§coefficient: String

Coefficient name.

§

PSpline

P-spline term with fitted basis metadata.

Fields

§col: Col<f64>

Source column.

§range: Range<usize>

Local coefficient range inside the parameter block.

§basis: OpenUniformSplineBasis

Fitted spline basis metadata.

§lambda: f64

Penalty weight.

§penalty_order: usize

Difference penalty order.

§coefficients: Vec<String>

Coefficient names for this term.

§

CyclicPSpline

Cyclic P-spline term with fitted metadata.

Fields

§col: Col<f64>

Source column.

§range: Range<usize>

Local coefficient range inside the parameter block.

§spec: CyclicSplineSpec

Cyclic spline metadata.

§lambda: f64

Penalty weight.

§penalty_order: usize

Difference penalty order.

§coefficients: Vec<String>

Coefficient names for this term.

§

Fourier

Fourier term with fitted metadata.

Fields

§col: Col<f64>

Source column.

§range: Range<usize>

Local coefficient range inside the parameter block.

§period: f64

Period.

§order: usize

Fourier order.

§include_intercept: bool

Whether this term includes an intercept coefficient.

§coefficients: Vec<String>

Coefficient names for this term.

§

TensorPSpline

Tensor-product P-spline metadata.

Fields

§left: Col<f64>

Left source column.

§right: Col<f64>

Right source column.

§range: Range<usize>

Local coefficient range inside the parameter block.

§left_basis: OpenUniformSplineBasis

Left fitted basis metadata.

§right_basis: OpenUniformSplineBasis

Right fitted basis metadata.

§coefficients: Vec<String>

Coefficient names for this term.

§

Monotone

Hard-monotone I-spline metadata.

Fields

§col: Col<f64>

Source column.

§range: Range<usize>

Local coefficient range inside the parameter block.

§basis: ISplineBasis

Fitted I-spline basis metadata.

§direction: MonotoneDirection

Monotonicity direction.

§coefficients: Vec<String>

Coefficient names for this term.

Implementations§

Source§

impl FittedTerm

Source

pub fn range(&self) -> Range<usize>

Local coefficient range inside the parameter block.

Trait Implementations§

Source§

impl Clone for FittedTerm

Source§

fn clone(&self) -> FittedTerm

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FittedTerm

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FittedTerm

Source§

fn eq(&self, other: &FittedTerm) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FittedTerm

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.