Represents a k-fold cross-validation utility.
std::vector< std::vector< int > > fold_indices
void split_indices(int num_instances)
Splits the indices of instances into k folds for cross-validation.
~Kfold()
Destructor for the Kfold class.
Kfold(int k)
Constructor for the Kfold class.
void perform_cross_validation(std::function< void(int, int)> train_and_test_func)
Performs k-fold cross-validation using the provided training and testing function.
The source C++ openGPMP namespace.