MCPcopy Create free account
hub / github.com/Open-Quant/openquant / new

Method new

crates/openquant/src/cross_validation.rs:118–127  ·  view source on GitHub ↗
(
        n_splits: usize,
        samples_info_sets: Vec<(NaiveDateTime, NaiveDateTime)>,
        pct_embargo: f64,
    )

Source from the content-addressed store, hash-verified

116 /// A required input is empty.
117 #[error("{0} cannot be empty")]
118 Empty(&'static str),
119 /// `n_samples` passed to a split method differs from the number of information sets.
120 #[error("Dataset length must match samples_info_sets")]
121 DatasetLengthMismatch,
122 /// `pct_embargo` is not a finite number in `[0, 1)`.
123 #[error("pct_embargo must be finite and in [0, 1), got {pct_embargo}")]
124 InvalidEmbargo {
125 /// The rejected value.
126 pct_embargo: f64,
127 },
128 /// An information set ends before it starts.
129 #[error("samples_info_sets[{index}] ends before it starts")]
130 InvalidInfoSet {

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected