pub struct Plr { /* private fields */ }Expand description
PLR estimator: ml_l learns E[Y | X], ml_m learns E[D | X], and
the optional ml_g learns g(X) for the IV-type score.
Implementations§
Source§impl Plr
impl Plr
pub fn new( ml_l: impl Regressor + 'static, ml_m: impl Regressor + 'static, ) -> Self
Sourcepub fn from_boxed(ml_l: Box<dyn Regressor>, ml_m: Box<dyn Regressor>) -> Self
pub fn from_boxed(ml_l: Box<dyn Regressor>, ml_m: Box<dyn Regressor>) -> Self
Like Plr::new for learners that are already boxed trait objects.
pub fn score(self, score: PlrScore) -> Self
Sourcepub fn ml_g(self, ml_g: impl Regressor + 'static) -> Self
pub fn ml_g(self, ml_g: impl Regressor + 'static) -> Self
Learner for g(X) in the IV-type score (default: a fresh copy of ml_l).
pub fn ml_g_boxed(self, ml_g: Box<dyn Regressor>) -> Self
Trait Implementations§
Source§impl LinearScoreModel for Plr
impl LinearScoreModel for Plr
Source§fn estimate_score(
&self,
input: &ScoreInput<'_>,
folds: &[Fold],
) -> Result<ScoreEstimate>
fn estimate_score( &self, input: &ScoreInput<'_>, folds: &[Fold], ) -> Result<ScoreEstimate>
Cross-fit the nuisances on
folds and return the score elements.Auto Trait Implementations§
impl !RefUnwindSafe for Plr
impl !UnwindSafe for Plr
impl Freeze for Plr
impl Send for Plr
impl Sync for Plr
impl Unpin for Plr
impl UnsafeUnpin for Plr
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more