pub trait LinearScoreModel {
// Required methods
fn name(&self) -> String;
fn estimate_score(
&self,
input: &ScoreInput<'_>,
folds: &[Fold],
) -> Result<ScoreEstimate>;
// Provided methods
fn validate(&self, _data: &DmlData) -> Result<()> { ... }
fn strata(&self, _data: &DmlData) -> Option<Vec<usize>> { ... }
}Expand description
A DML model whose orthogonal score is linear in θ.
Implement this to plug a new score into the shared machinery (repeated
cross-fitting, aggregation, inference, bootstrap) via fit_model.
Required Methods§
Sourcefn 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.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".