[−][src]Struct ndarray_glm::model::Model
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]
M: Glm,
F: Float,
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,
F: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, F> Send for Model<M, F> where
F: Send,
M: Send,
F: Send,
M: Send,
impl<M, F> Sync for Model<M, F> where
F: Sync,
M: Sync,
F: Sync,
M: Sync,
impl<M, F> Unpin for Model<M, F> where
M: Unpin,
M: Unpin,
impl<M, F> UnwindSafe for Model<M, F> where
F: RefUnwindSafe,
M: UnwindSafe,
F: RefUnwindSafe,
M: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,