Skip to main content

BuiltModel

Struct BuiltModel 

Source
pub struct BuiltModel<M> { /* private fields */ }
Expand description

Compiled formula artifact.

Implementations§

Source§

impl<M> BuiltModel<M>

Source

pub fn model(&self) -> &M

Returns the compiled core model.

Source

pub fn model_mut(&mut self) -> &mut M

Returns the compiled core model mutably.

Source

pub fn into_model(self) -> M

Consumes the artifact and returns the compiled core model.

Source

pub fn schema(&self) -> &ModelSchema

Returns formula schema metadata.

Source

pub fn terms(&self) -> &[ParameterTerms]

Returns fitted terms grouped by distribution parameter.

Source

pub fn terms_for(&self, parameter: &str) -> Option<&[FittedTerm]>

Returns fitted terms for one distribution parameter.

Source

pub fn coefficient_names(&self) -> Vec<&str>

Returns coefficient names in model layout order.

Source

pub fn layout(&self) -> &ParameterLayout

Returns core parameter layout.

Source§

impl<'a> BuiltModel<CompiledNormal<'a>>

Source

pub fn prediction_blocks<D>( &self, data: &D, ) -> Result<NormalBlocks, FormulaError>
where D: DataView + ?Sized,

Rebuilds compatible typed prediction blocks from fitted term metadata.

Source

pub fn prediction_design<D>( &self, data: &D, ) -> Result<PredictionDesign<NormalBlocks>, FormulaError>
where D: DataView + ?Sized,

Builds reusable prediction design from fitted term metadata.

Source

pub fn predict_theta_with_design( &self, theta: &[f64], design: &PredictionDesign<NormalBlocks>, ) -> Result<Vec<<DefaultNormal as Family>::Theta>, FormulaError>

Predicts natural-scale distribution parameters with reusable prediction design.

Source

pub fn predict_theta<D>( &self, theta: &[f64], data: &D, ) -> Result<Vec<<DefaultNormal as Family>::Theta>, FormulaError>
where D: DataView + ?Sized,

Predicts natural-scale distribution parameters for new rows.

Source§

impl<'a> BuiltModel<CompiledGamma<'a>>

Source

pub fn prediction_blocks<D>( &self, data: &D, ) -> Result<GammaBlocks, FormulaError>
where D: DataView + ?Sized,

Rebuilds compatible typed prediction blocks from fitted term metadata.

Source

pub fn prediction_design<D>( &self, data: &D, ) -> Result<PredictionDesign<GammaBlocks>, FormulaError>
where D: DataView + ?Sized,

Builds reusable prediction design from fitted term metadata.

Source

pub fn predict_theta_with_design( &self, theta: &[f64], design: &PredictionDesign<GammaBlocks>, ) -> Result<Vec<<DefaultGamma as Family>::Theta>, FormulaError>

Predicts natural-scale distribution parameters with reusable prediction design.

Source

pub fn predict_theta<D>( &self, theta: &[f64], data: &D, ) -> Result<Vec<<DefaultGamma as Family>::Theta>, FormulaError>
where D: DataView + ?Sized,

Predicts natural-scale distribution parameters for new rows.

Source§

impl<'a> BuiltModel<CompiledLogNormal<'a>>

Source

pub fn prediction_blocks<D>( &self, data: &D, ) -> Result<LogNormalBlocks, FormulaError>
where D: DataView + ?Sized,

Rebuilds compatible typed prediction blocks from fitted term metadata.

Source

pub fn prediction_design<D>( &self, data: &D, ) -> Result<PredictionDesign<LogNormalBlocks>, FormulaError>
where D: DataView + ?Sized,

Builds reusable prediction design from fitted term metadata.

Source

pub fn predict_theta_with_design( &self, theta: &[f64], design: &PredictionDesign<LogNormalBlocks>, ) -> Result<Vec<<DefaultLogNormal as Family>::Theta>, FormulaError>

Predicts natural-scale distribution parameters with reusable prediction design.

Source

pub fn predict_theta<D>( &self, theta: &[f64], data: &D, ) -> Result<Vec<<DefaultLogNormal as Family>::Theta>, FormulaError>
where D: DataView + ?Sized,

Predicts natural-scale distribution parameters for new rows.

Source§

impl<'a> BuiltModel<CompiledWeibull<'a>>

Source

pub fn prediction_blocks<D>( &self, data: &D, ) -> Result<WeibullBlocks, FormulaError>
where D: DataView + ?Sized,

Rebuilds compatible typed prediction blocks from fitted term metadata.

Source

pub fn prediction_design<D>( &self, data: &D, ) -> Result<PredictionDesign<WeibullBlocks>, FormulaError>
where D: DataView + ?Sized,

Builds reusable prediction design from fitted term metadata.

Source

pub fn predict_theta_with_design( &self, theta: &[f64], design: &PredictionDesign<WeibullBlocks>, ) -> Result<Vec<<DefaultWeibull as Family>::Theta>, FormulaError>

Predicts natural-scale distribution parameters with reusable prediction design.

Source

pub fn predict_theta<D>( &self, theta: &[f64], data: &D, ) -> Result<Vec<<DefaultWeibull as Family>::Theta>, FormulaError>
where D: DataView + ?Sized,

Predicts natural-scale distribution parameters for new rows.

Source§

impl<'a> BuiltModel<CompiledInverseGaussian<'a>>

Source

pub fn prediction_blocks<D>( &self, data: &D, ) -> Result<InverseGaussianBlocks, FormulaError>
where D: DataView + ?Sized,

Rebuilds compatible typed prediction blocks from fitted term metadata.

Source

pub fn prediction_design<D>( &self, data: &D, ) -> Result<PredictionDesign<InverseGaussianBlocks>, FormulaError>
where D: DataView + ?Sized,

Builds reusable prediction design from fitted term metadata.

Source

pub fn predict_theta_with_design( &self, theta: &[f64], design: &PredictionDesign<InverseGaussianBlocks>, ) -> Result<Vec<<DefaultInverseGaussian as Family>::Theta>, FormulaError>

Predicts natural-scale distribution parameters with reusable prediction design.

Source

pub fn predict_theta<D>( &self, theta: &[f64], data: &D, ) -> Result<Vec<<DefaultInverseGaussian as Family>::Theta>, FormulaError>
where D: DataView + ?Sized,

Predicts natural-scale distribution parameters for new rows.

Source§

impl<'a> BuiltModel<CompiledBeta<'a>>

Source

pub fn prediction_blocks<D>(&self, data: &D) -> Result<BetaBlocks, FormulaError>
where D: DataView + ?Sized,

Rebuilds compatible typed prediction blocks from fitted term metadata.

Source

pub fn prediction_design<D>( &self, data: &D, ) -> Result<PredictionDesign<BetaBlocks>, FormulaError>
where D: DataView + ?Sized,

Builds reusable prediction design from fitted term metadata.

Source

pub fn predict_theta_with_design( &self, theta: &[f64], design: &PredictionDesign<BetaBlocks>, ) -> Result<Vec<<DefaultBeta as Family>::Theta>, FormulaError>

Predicts natural-scale distribution parameters with reusable prediction design.

Source

pub fn predict_theta<D>( &self, theta: &[f64], data: &D, ) -> Result<Vec<<DefaultBeta as Family>::Theta>, FormulaError>
where D: DataView + ?Sized,

Predicts natural-scale distribution parameters for new rows.

Trait Implementations§

Source§

impl<M: Clone> Clone for BuiltModel<M>

Source§

fn clone(&self) -> BuiltModel<M>

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<M: Debug> Debug for BuiltModel<M>

Source§

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

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

impl<M: PartialEq> PartialEq for BuiltModel<M>

Source§

fn eq(&self, other: &BuiltModel<M>) -> 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<M: PartialEq> StructuralPartialEq for BuiltModel<M>

Auto Trait Implementations§

§

impl<M> Freeze for BuiltModel<M>
where M: Freeze,

§

impl<M> RefUnwindSafe for BuiltModel<M>
where M: RefUnwindSafe,

§

impl<M> Send for BuiltModel<M>
where M: Send,

§

impl<M> Sync for BuiltModel<M>
where M: Sync,

§

impl<M> Unpin for BuiltModel<M>
where M: Unpin,

§

impl<M> UnsafeUnpin for BuiltModel<M>
where M: UnsafeUnpin,

§

impl<M> UnwindSafe for BuiltModel<M>
where M: UnwindSafe,

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.