Skip to main content

VariantSelection

Struct VariantSelection 

Source
pub struct VariantSelection {
    pub selected_variant_id: VariantId,
    pub validation_reports: Vec<RegressionMetricReport>,
    pub variant_validation_predictions: Vec<VariantValidationPredictions>,
}
Expand description

Outcome of native variant selection: the winning variant plus EVERY scored variant’s cross-validation reports, each tagged with its own variant_id.

The reports are the per-fold + cross-fold-OOF-average VALIDATION (OOF) reports collected while ranking. They are emitted so a generated sweep can surface every variant’s CV score — not only the winner’s — to match the legacy per-variant num_predictions. These are REPORT-ONLY validation scores of non-selected models: they never feed any downstream training/feature path (no prediction blocks, no RegressionTargetRecords, no handles leave selection — see select_best_variant_by_cv), so the OOF/leakage invariants are unaffected.

Fields§

§selected_variant_id: VariantId

The winning variant, ranked by selection_metric. The SELECT DECISION is identical to the pre-existing behavior; validation_reports is purely additive context.

§validation_reports: Vec<RegressionMetricReport>

Per-variant VALIDATION (OOF) reports for ALL ranked variants (winner included), each tagged with its variant_id. The cross-fold OOF average per producer is re-tagged with the variant id (its native form has variant_id = None); the per-fold reports already carry it.

§variant_validation_predictions: Vec<VariantValidationPredictions>

Per-variant VALIDATION (OOF) PREDICTIONS for ALL ranked variants (winner included), captured from each variant’s transient FIT_CV RunContext BEFORE it is dropped, re-tagged with the variant’s id + content fingerprint. The scalar validation_reports above carry only the score; these carry the per-sample y_pred (+ id-matched y_true) so a host can fill a non-selected variant’s per-fold prediction rows, not just its CV score.

LEAKAGE: these are each variant’s OWN validation (OOF) predictions, re-tagged with that variant’s id (which prevents cross-variant mixing). They are surfaced for host persistence/display only — every transient CV run executes FIT_CV ONLY (no Final/Test/refit), so by construction this carries no train/refit predictions, and the captured blocks never feed a training/feature path or cross a requires_oof edge. This is strictly ADDITIVE — the same values the scalar reports were computed from, exposed per sample — analogous to the additive OOF-average block surfacing; no leakage validator is relaxed.

Trait Implementations§

Source§

impl Clone for VariantSelection

Source§

fn clone(&self) -> VariantSelection

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VariantSelection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more