|
CMP++: Uncertainty Quantification & Bayesian Calibration
|
Iterator class to traverse folds for K-Fold cross-validation. More...
#include <statistics.h>

Public Member Functions | |
| KFoldIterator (const KFold &kf, Eigen::Index split) | |
| Constructs a KFoldIterator. | |
| bool | operator!= (const KFoldIterator &other) const |
| Checks inequality with another iterator (used for loop termination). | |
| std::pair< Eigen::VectorXs, Eigen::VectorXs > | operator* () const |
| Dereferences the iterator to compute training and test index sets for the current fold. | |
| KFoldIterator & | operator++ () |
| Increments the iterator to point to the next fold. | |
Private Attributes | |
| Eigen::Index | currentSplit_ |
| The current active fold index \( k \). | |
| const KFold & | parent_ |
| Reference to the parent KFold object to access index arrays and sizes. | |
Iterator class to traverse folds for K-Fold cross-validation.
|
inline |
Constructs a KFoldIterator.
| kf | Reference to the parent KFold object. |
| split | Index of the current split/fold. |
|
inline |
Checks inequality with another iterator (used for loop termination).
| other | The iterator to compare against. |
|
inline |
Dereferences the iterator to compute training and test index sets for the current fold.
|
inline |
Increments the iterator to point to the next fold.
|
private |
The current active fold index \( k \).
|
private |
Reference to the parent KFold object to access index arrays and sizes.