[][src]Struct ndarray_glm::model::Model

pub struct Model<M, F> where
    M: Glm,
    F: Float
{ pub model: PhantomData<M>, pub y: Array1<F>, pub x: Array2<F>, pub linear_offset: Option<Array1<F>>, pub use_intercept: bool, }

Holds the data and configuration settings for a regression.

Fields

model: PhantomData<M>y: Array1<F>

the observation of response data by event

x: Array2<F>

the design matrix with events in rows and instances in columns

linear_offset: Option<Array1<F>>

The offset in the linear predictor for each data point. This can be used to fix the effect of control variables.

use_intercept: bool

Whether the intercept term is used (commonly true)

Implementations

impl<M, F> Model<M, F> where
    M: Glm,
    F: Float
[src]

pub fn fit(&self) -> RegressionResult<Fit<M, F>>[src]

Perform the regression and return a fit object holding the results.

pub fn fit_options(&self) -> FitConfig<M, F>[src]

Fit options builder interface

pub fn with_options(&self, options: FitOptions<F>) -> FitConfig<M, F>[src]

An experimental interface that would allow fit options to be set externally.

pub fn linear_predictor(&self, regressors: &Array1<F>) -> Array1<F>[src]

Returns the linear predictors, i.e. the design matrix multiplied by the regression parameters. Each entry in the resulting array is the linear predictor for a given observation. If linear offsets for each observation are provided, these are added to the linear predictors

Auto Trait Implementations

impl<M, F> RefUnwindSafe for Model<M, F> where
    F: RefUnwindSafe,
    M: RefUnwindSafe

impl<M, F> Send for Model<M, F> where
    F: Send,
    M: Send

impl<M, F> Sync for Model<M, F> where
    F: Sync,
    M: Sync

impl<M, F> Unpin for Model<M, F> where
    M: Unpin

impl<M, F> UnwindSafe for Model<M, F> where
    F: RefUnwindSafe,
    M: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.