pub struct CvResults {
pub scorer_names: Vec<String>,
pub test_scores: Vec<Vec<f64>>,
pub train_scores: Option<Vec<Vec<f64>>>,
pub fit_times: Vec<Duration>,
pub score_times: Vec<Duration>,
}Expand description
Results of a cross_validate run.
Scores are stored as [scorer][fold]. Use mean_test_score /
std_test_score (by index or by name) for summaries.
Fields§
§scorer_names: Vec<String>Metric names, in the order they were supplied.
test_scores: Vec<Vec<f64>>Test scores as [scorer][fold].
train_scores: Option<Vec<Vec<f64>>>Train scores as [scorer][fold], if return_train_scores was set.
fit_times: Vec<Duration>Wall-clock fit time per fold.
score_times: Vec<Duration>Wall-clock score time per fold.
Implementations§
Source§impl CvResults
impl CvResults
Sourcepub fn mean_test_score(&self, idx: usize) -> f64
pub fn mean_test_score(&self, idx: usize) -> f64
Mean test score for scorer idx.
Sourcepub fn std_test_score(&self, idx: usize) -> f64
pub fn std_test_score(&self, idx: usize) -> f64
Population standard deviation of the test scores for scorer idx.
Sourcepub fn mean_test_score_by_name(&self, name: &str) -> Option<f64>
pub fn mean_test_score_by_name(&self, name: &str) -> Option<f64>
Mean test score for the scorer named name, if present.
Sourcepub fn total_fit_time(&self) -> Duration
pub fn total_fit_time(&self) -> Duration
Total fit time across all folds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CvResults
impl RefUnwindSafe for CvResults
impl Send for CvResults
impl Sync for CvResults
impl Unpin for CvResults
impl UnsafeUnpin for CvResults
impl UnwindSafe for CvResults
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