ezyrb.reducedordermodel.ReducedOrderModel.kfold_cv_error
- ReducedOrderModel.kfold_cv_error(n_splits, *args, norm=<function norm>, **kwargs)[source]
Split the database into k consecutive folds (no shuffling by default). Each fold is used once as a validation while the k - 1 remaining folds form the training set. If n_splits is equal to the number of snapshots this function is the same as loo_error but the error here is relative and not absolute.
- Parameters:
n_splits (int) – number of folds. Must be at least 2.
norm (function) – function to apply to compute the relative error between the true snapshot and the predicted one. Default value is the L2 norm.
*args – additional parameters to pass to the fit method.
**kwargs – additional parameters to pass to the fit method.
- Returns:
the vector containing the errors corresponding to each fold.
- Return type: