pub struct XLearner { /* private fields */ }Expand description
X-learner (Künzel et al., 2019).
- Fit
μ₀,μ₁per arm (outcomelearner). - Impute effects:
Y − μ₀(X)for treated,μ₁(X) − Yfor controls. - Model the imputed effects per arm (
effectlearner):τ₁,τ₀. - Blend:
τ̂(x) = e(x)·τ₀(x) + (1 − e(x))·τ₁(x)with propensitye.
Implementations§
Source§impl XLearner
impl XLearner
pub fn new( outcome: impl Regressor + 'static, effect: impl Regressor + 'static, propensity: impl Classifier + 'static, ) -> Self
pub fn from_boxed( outcome: Box<dyn Regressor>, effect: Box<dyn Regressor>, propensity: Box<dyn Classifier>, ) -> Self
pub fn fit(&self, data: &DmlData) -> Result<CateFit>
Auto Trait Implementations§
impl !RefUnwindSafe for XLearner
impl !UnwindSafe for XLearner
impl Freeze for XLearner
impl Send for XLearner
impl Sync for XLearner
impl Unpin for XLearner
impl UnsafeUnpin for XLearner
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