#[non_exhaustive]pub struct ScoreEstimate {
pub score: LinearScore,
pub predictions: Vec<(Name, Array1<f64>)>,
pub sensitivity: Option<SensitivityParts>,
pub targets: Vec<NuisanceTarget>,
pub cate: Option<CateSignal>,
}Expand description
Score elements plus the cross-fitted nuisance predictions behind them.
Build it with ScoreEstimate::new (the struct is #[non_exhaustive], so
fields can be added without breaking custom models).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.score: LinearScore§predictions: Vec<(Name, Array1<f64>)>(name, out-of-fold predictions) — e.g. ("ml_l", ℓ̂).
sensitivity: Option<SensitivityParts>Ingredients for sensitivity analysis, if the model supports it.
targets: Vec<NuisanceTarget>What each nuisance learner predicts, for out-of-sample diagnostics.
cate: Option<CateSignal>Signal for CATE / GATE inference, if the model supports it.
Implementations§
Source§impl ScoreEstimate
impl ScoreEstimate
Sourcepub fn new<N: Into<Name>>(
score: LinearScore,
predictions: Vec<(N, Array1<f64>)>,
) -> Self
pub fn new<N: Into<Name>>( score: LinearScore, predictions: Vec<(N, Array1<f64>)>, ) -> Self
predictions pairs a name (a literal such as "ml_l", or a
String) with the out-of-fold predictions.
Sourcepub fn with_cate_signal(self, cate: CateSignal) -> Self
pub fn with_cate_signal(self, cate: CateSignal) -> Self
Attach the signal for CATE / GATE inference.
Sourcepub fn with_targets(self, targets: Vec<NuisanceTarget>) -> Self
pub fn with_targets(self, targets: Vec<NuisanceTarget>) -> Self
Attach the nuisance targets used for learner diagnostics.
Sourcepub fn with_sensitivity(self, parts: SensitivityParts) -> Self
pub fn with_sensitivity(self, parts: SensitivityParts) -> Self
Attach the model’s sensitivity ingredients.
Trait Implementations§
Source§impl Clone for ScoreEstimate
impl Clone for ScoreEstimate
Auto Trait Implementations§
impl Freeze for ScoreEstimate
impl RefUnwindSafe for ScoreEstimate
impl Send for ScoreEstimate
impl Sync for ScoreEstimate
impl Unpin for ScoreEstimate
impl UnsafeUnpin for ScoreEstimate
impl UnwindSafe for ScoreEstimate
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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