pub struct DrLearner { /* private fields */ }Expand description
DR-learner (Kennedy, 2023): cross-fit ĝ₀, ĝ₁ and the propensity m̂
exactly as Irm does, form the AIPW pseudo-outcome
φ = ĝ₁ − ĝ₀ + D(Y − ĝ₁)/m̂ − (1 − D)(Y − ĝ₀)/(1 − m̂), and regress it
on X with the effect learner.
Implementations§
Source§impl DrLearner
impl DrLearner
pub fn new( outcome: impl Regressor + 'static, propensity: impl Classifier + 'static, effect: impl Regressor + 'static, ) -> Self
pub fn from_boxed( outcome: Box<dyn Regressor>, propensity: Box<dyn Classifier>, effect: Box<dyn Regressor>, ) -> Self
pub fn n_folds(self, n_folds: usize) -> Self
pub fn seed(self, seed: u64) -> Self
Sourcepub fn clipping_threshold(self, t: f64) -> Self
pub fn clipping_threshold(self, t: f64) -> Self
Propensities are clipped to [t, 1 − t] (default 0.01).
pub fn fit(&self, data: &DmlData) -> Result<CateFit>
pub fn fit_with_folds(&self, data: &DmlData, folds: &[Fold]) -> Result<CateFit>
Auto Trait Implementations§
impl !RefUnwindSafe for DrLearner
impl !UnwindSafe for DrLearner
impl Freeze for DrLearner
impl Send for DrLearner
impl Sync for DrLearner
impl Unpin for DrLearner
impl UnsafeUnpin for DrLearner
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