dcase_models.util.get_fold_val¶
-
dcase_models.util.
get_fold_val
(fold_test, fold_list)[source]¶ Get the validation fold given the test fold.
Useful for cross-validation evaluation mode.
Return the next fold in a circular way. e.g. if the fold_list is [‘fold1’, ‘fold2’,…,’fold10’] and the fold_test is ‘fold1’, then return ‘fold2’. If the fold_test is ‘fold10’, return ‘fold1’.
Parameters: - fold_test : str
Fold used for model testing.
- fold_list : list of str
Fold list.
Returns: - str
Validation fold.