pub struct Pq { /* private fields */ }Expand description
Potential quantile θ with P(Y(d) ≤ θ) = τ, as DoubleML’s DoubleMLPQ.
ml_g is a classifier for P(Y ≤ θ̃ | D = d, X) at the preliminary
estimate θ̃, ml_m a classifier for the propensity P(D = 1 | X).
Default sample splits are stratified by the treatment.
Implementations§
Source§impl Pq
impl Pq
pub fn new( ml_g: impl Classifier + 'static, ml_m: impl Classifier + 'static, ) -> Self
pub fn from_boxed(ml_g: Box<dyn Classifier>, ml_m: Box<dyn Classifier>) -> Self
Sourcepub fn treatment(self, treatment: u8) -> Self
pub fn treatment(self, treatment: u8) -> Self
Treatment level d of the potential outcome (0 or 1, default 1).
Sourcepub fn clipping_threshold(self, t: f64) -> Self
pub fn clipping_threshold(self, t: f64) -> Self
Propensity scores are clipped to [t, 1 − t] (default t = 0.01).
Sourcepub fn normalize_ipw(self, normalize: bool) -> Self
pub fn normalize_ipw(self, normalize: bool) -> Self
Normalise the inverse-probability weights (default true, as DoubleML).
Sourcepub fn calibration(self, calibration: Calibration) -> Self
pub fn calibration(self, calibration: Calibration) -> Self
Calibrate the propensity scores before clipping (default: none), as
DoubleML’s ps_processor_config.
pub fn fit(&self, data: &DmlData) -> Result<DmlFit>
pub fn fit_with_folds( &self, data: &DmlData, splits: &[Vec<Fold>], ) -> Result<DmlFit>
Auto Trait Implementations§
impl !RefUnwindSafe for Pq
impl !UnwindSafe for Pq
impl Freeze for Pq
impl Send for Pq
impl Sync for Pq
impl Unpin for Pq
impl UnsafeUnpin for Pq
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