I'm solving the spectroscopy problem. Based on reflectivity values for wavelengths from the spectrum, I build a regression to find a target for the sample.
I have 30 samples. For each sample I take measurements of its spectrum 3 times. In total, I get 90 elements in the dataset, but in fact, 2/3 of the elements repeat the existing spectrum with a small error. Target for each sample is almost not repeated, distributed from 0 to 100.
The question is:
1)How to split multiple measurements of the same sample between folds? (should I use GroupKFold?)
If, for example, we make LOO cross validation, then we have two measurements of the same spectrum in the training set and its third measurement is in the test set. As a result, we have a very small error. 2)But wouldn't it be a "leak" ?
3)Or should all three measurements of the same sample be in the same fold only?
Thanks.