pub fn validation_curve<S, F, M, P>(
splitter: &S,
x: &Array2<f64>,
y: &Array1<f64>,
fit_fn: F,
scorer: &(dyn Scorer + Sync),
param_range: &[P],
) -> Result<ValidationCurve<P>>Expand description
Compute a validation curve: for each hyperparameter value and each fold, fit with that value and score on train and validation.
fit_fn here takes the parameter value as its first argument (e.g. a closure
over “fit a decision tree with this max_depth”).
With the parallel feature the param × fold grid is fanned out over
rayon.
§Errors
Propagates any error from splitter.split(x.nrows()).