Skip to main content

Dataset

Struct Dataset 

Source
pub struct Dataset<F>
where F: Float,
{ pub y: Array1<F>, pub x: Array2<F>, pub linear_offset: Option<Array1<F>>, pub weights: Option<Array1<F>>, pub freqs: Option<Array1<F>>, }

Fields§

§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.

§weights: Option<Array1<F>>

The variance weight of each observation (a.k.a. analytic weights)

§freqs: Option<Array1<F>>

The frequency of each observation (traditionally positive integers)

Implementations§

Source§

impl<F> Dataset<F>
where F: Float,

Source

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

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

Source

pub fn n_obs(&self) -> F

Total number of observations as given by the sum of the frequencies of observations

Source

pub fn n_eff(&self) -> F

Returns the effective sample size corrected for the design effect. This exposes the sum of the squares of the variance weights.

Trait Implementations§

Source§

impl<F> Clone for Dataset<F>
where F: Float + Clone,

Source§

fn clone(&self) -> Dataset<F>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<F> Freeze for Dataset<F>

§

impl<F> RefUnwindSafe for Dataset<F>
where F: RefUnwindSafe,

§

impl<F> Send for Dataset<F>
where F: Send,

§

impl<F> Sync for Dataset<F>
where F: Sync,

§

impl<F> Unpin for Dataset<F>

§

impl<F> UnsafeUnpin for Dataset<F>

§

impl<F> UnwindSafe for Dataset<F>
where F: RefUnwindSafe,

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V