Struct ndarray_glm::model::Dataset [−][src]
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>>,
// some fields omitted
}
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 weight of each observation
Implementations
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
Returns the hat matrix of the dataset of covariate data, also known as the “projection” or “influence” matrix.
Returns the leverage for each observation. This is given by the diagonal of the projection matrix and indicates the sensitivity of each prediction to its corresponding observation.