This is more a general machine learning than a specific MNE-Python question, but here goes:
When training and scoring a classifier or regressor timepoint by timepoint to evaluate the performance evolution over time, is it advisable – or rather a methodological mistake? – to tune the model’s hyper-parameters on every time point?
Take for example the case where I want to predict a continuous response variable (e.g., a rating) collected at the end of a trial based on electrophysiological data in the few seconds preceding the rating. Assume I want to use ridge regression, which critically depends on a suitable regularization parameter, alpha, which is commonly found through cross-validation. Would I run this cross-validation (e.g., via scikit-learn’s RidgeCV
) for every time point separately and then use this alpha for this specific time point, and potentially a whole different alpha for the next time point? Or would I rather average the alphas found for all time points and then use the same (mean) alpha for all time points?
I suppose the answer depends on the exact research question and interpretation of the results, but I couldn’t find any guidance in the literature I consulted. Any pointers would be highly appreciated!
Richard
cautiously tagging @agramfort here