pub struct PredictCohort {
pub role: PredictCohortRole,
pub physical_sample_ids: Vec<SampleId>,
pub origin_sample_ids: Vec<SampleId>,
pub target_names: Vec<String>,
pub relation_fingerprint: String,
pub relations: SampleRelationSet,
pub data_content_fingerprint: String,
pub target_content_fingerprint: Option<String>,
pub cohort_fingerprint: String,
}Expand description
Closed, PREDICT-only relation authority introduced by envelope V2.
It is never a supplement to coordinator_relations: CV, OOF, SELECT and
training influence continue to consume only the latter. The explicit
physical/origin lists prevent a producer from silently changing a cohort by
reordering or dropping relation records.
Fields§
§role: PredictCohortRole§physical_sample_ids: Vec<SampleId>§origin_sample_ids: Vec<SampleId>§target_names: Vec<String>§relation_fingerprint: String§relations: SampleRelationSet§data_content_fingerprint: String§target_content_fingerprint: Option<String>§cohort_fingerprint: StringImplementations§
Source§impl PredictCohort
impl PredictCohort
Sourcepub fn from_relations(
role: PredictCohortRole,
relations: SampleRelationSet,
target_names: Vec<String>,
data_content_fingerprint: String,
target_content_fingerprint: Option<String>,
) -> Result<PredictCohort, DagMlError>
pub fn from_relations( role: PredictCohortRole, relations: SampleRelationSet, target_names: Vec<String>, data_content_fingerprint: String, target_content_fingerprint: Option<String>, ) -> Result<PredictCohort, DagMlError>
Build the closed PREDICT-only authority from its authoritative relation records.
Producers must use this constructor instead of reimplementing the relation, identity and cohort fingerprint algorithms in a host binding. The relation records remain the sole source of physical and origin identities; the derived lists are sorted sets so a producer cannot accidentally make a cohort depend on host iteration order.
pub fn fingerprint(&self) -> Result<String, DagMlError>
pub fn validate(&self) -> Result<(), DagMlError>
Sourcepub fn validate_against_cv_fold_set(
&self,
fold_set: &FoldSet,
) -> Result<(), DagMlError>
pub fn validate_against_cv_fold_set( &self, fold_set: &FoldSet, ) -> Result<(), DagMlError>
External-test rows must never share a physical or origin identity with the CV universe. Inference is intentionally allowed to replay a known sample, but cannot carry targets or selection evidence.
Sourcepub fn validate_against_cv_relations(
&self,
cv_relations: &SampleRelationSet,
) -> Result<(), DagMlError>
pub fn validate_against_cv_relations( &self, cv_relations: &SampleRelationSet, ) -> Result<(), DagMlError>
Refuse an external-test cohort that intersects the full physical-or-origin identity closure of the CV relation authority.
FoldSet carries only physical sample ids. The coordinator relation set
is therefore additionally required to prove that a held-out row did not
arrive through a CV origin alias.
Trait Implementations§
Source§impl Clone for PredictCohort
impl Clone for PredictCohort
Source§fn clone(&self) -> PredictCohort
fn clone(&self) -> PredictCohort
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more