pub struct ParameterBlock<P, L, X, Penalty> {
pub x: X,
pub penalty: Penalty,
pub offset: usize,
pub len: usize,
/* private fields */
}Expand description
Типизированный block коэффициентов для одного параметра распределения.
P задаёт роль параметра, L задаёт link-функцию, X хранит predictor
block, а Penalty добавляет регуляризацию. offset и len описывают
диапазон коэффициентов блока внутри общего вектора beta.
Fields§
§x: XPredictor block.
penalty: PenaltyPenalty, применяемый к коэффициентам блока.
offset: usizeНачальная позиция блока в общем beta-векторе.
len: usizeЧисло коэффициентов в блоке.
Implementations§
Source§impl<P, L, X, Penalty> ParameterBlock<P, L, X, Penalty>where
X: PredictorBlock,
impl<P, L, X, Penalty> ParameterBlock<P, L, X, Penalty>where
X: PredictorBlock,
Sourcepub fn new(x: X, penalty: Penalty, offset: usize) -> Self
pub fn new(x: X, penalty: Penalty, offset: usize) -> Self
Создаёт блок и берёт len из x.nparams().
Sourcepub fn from_predictor(x: X, penalty: Penalty, offset: usize) -> Self
pub fn from_predictor(x: X, penalty: Penalty, offset: usize) -> Self
Создаёт блок из generic predictor.
Это синоним Self::new, оставленный для кода, где явное слово
predictor делает вызов читаемее.
Source§impl<P, L, X, Penalty> ParameterBlock<P, L, LinearPredictorBlock<X>, Penalty>where
X: DesignMatrix,
impl<P, L, X, Penalty> ParameterBlock<P, L, LinearPredictorBlock<X>, Penalty>where
X: DesignMatrix,
Source§impl<P, L, X, Penalty> ParameterBlock<P, L, X, Penalty>
impl<P, L, X, Penalty> ParameterBlock<P, L, X, Penalty>
Sourcepub fn with_offset(self, offset: usize) -> Self
pub fn with_offset(self, offset: usize) -> Self
Возвращает копию блока с новым offset.
Trait Implementations§
Source§impl<P: Clone, L: Clone, X: Clone, Penalty: Clone> Clone for ParameterBlock<P, L, X, Penalty>
impl<P: Clone, L: Clone, X: Clone, Penalty: Clone> Clone for ParameterBlock<P, L, X, Penalty>
Source§fn clone(&self) -> ParameterBlock<P, L, X, Penalty>
fn clone(&self) -> ParameterBlock<P, L, X, Penalty>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: Debug, L: Debug, X: Debug, Penalty: Debug> Debug for ParameterBlock<P, L, X, Penalty>
impl<P: Debug, L: Debug, X: Debug, Penalty: Debug> Debug for ParameterBlock<P, L, X, Penalty>
Source§impl<P: PartialEq, L: PartialEq, X: PartialEq, Penalty: PartialEq> PartialEq for ParameterBlock<P, L, X, Penalty>
impl<P: PartialEq, L: PartialEq, X: PartialEq, Penalty: PartialEq> PartialEq for ParameterBlock<P, L, X, Penalty>
Source§fn eq(&self, other: &ParameterBlock<P, L, X, Penalty>) -> bool
fn eq(&self, other: &ParameterBlock<P, L, X, Penalty>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<P, L, X, Penalty> StructuralPartialEq for ParameterBlock<P, L, X, Penalty>
Auto Trait Implementations§
impl<P, L, X, Penalty> Freeze for ParameterBlock<P, L, X, Penalty>
impl<P, L, X, Penalty> RefUnwindSafe for ParameterBlock<P, L, X, Penalty>
impl<P, L, X, Penalty> Send for ParameterBlock<P, L, X, Penalty>
impl<P, L, X, Penalty> Sync for ParameterBlock<P, L, X, Penalty>
impl<P, L, X, Penalty> Unpin for ParameterBlock<P, L, X, Penalty>
impl<P, L, X, Penalty> UnsafeUnpin for ParameterBlock<P, L, X, Penalty>where
X: UnsafeUnpin,
Penalty: UnsafeUnpin,
impl<P, L, X, Penalty> UnwindSafe for ParameterBlock<P, L, X, Penalty>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more