pub struct CrossValidator { /* private fields */ }Expand description
Main cross-validation framework
Implementations§
Source§impl CrossValidator
impl CrossValidator
Sourcepub fn new(config: CrossValidationConfig) -> Self
pub fn new(config: CrossValidationConfig) -> Self
Create a new cross-validator
Sourcepub fn cross_validate_rbf(
&self,
x: &Array2<f64>,
y: Option<&Array1<f64>>,
parameters: &ParameterSet,
) -> Result<CrossValidationResult>
pub fn cross_validate_rbf( &self, x: &Array2<f64>, y: Option<&Array1<f64>>, parameters: &ParameterSet, ) -> Result<CrossValidationResult>
Perform cross-validation for RBF sampler
Sourcepub fn cross_validate_nystroem(
&self,
x: &Array2<f64>,
y: Option<&Array1<f64>>,
parameters: &ParameterSet,
) -> Result<CrossValidationResult>
pub fn cross_validate_nystroem( &self, x: &Array2<f64>, y: Option<&Array1<f64>>, parameters: &ParameterSet, ) -> Result<CrossValidationResult>
Perform cross-validation for Nyström method
Sourcepub fn cross_validate_with_search(
&self,
x: &Array2<f64>,
y: Option<&Array1<f64>>,
parameter_learner: &ParameterLearner,
) -> Result<(ParameterSet, CrossValidationResult)>
pub fn cross_validate_with_search( &self, x: &Array2<f64>, y: Option<&Array1<f64>>, parameter_learner: &ParameterLearner, ) -> Result<(ParameterSet, CrossValidationResult)>
Cross-validate with parameter search
Sourcepub fn grid_search_cv(
&self,
x: &Array2<f64>,
y: Option<&Array1<f64>>,
param_grid: &HashMap<String, Vec<f64>>,
) -> Result<(ParameterSet, f64, HashMap<ParameterSet, CrossValidationResult>)>
pub fn grid_search_cv( &self, x: &Array2<f64>, y: Option<&Array1<f64>>, param_grid: &HashMap<String, Vec<f64>>, ) -> Result<(ParameterSet, f64, HashMap<ParameterSet, CrossValidationResult>)>
Grid search with cross-validation
Auto Trait Implementations§
impl Freeze for CrossValidator
impl RefUnwindSafe for CrossValidator
impl Send for CrossValidator
impl Sync for CrossValidator
impl Unpin for CrossValidator
impl UnwindSafe for CrossValidator
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
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