pyeeg.models
.TRFEstimator.xfit
- TRFEstimator.xfit(X, y, n_splits=5, lagged=False, drop=True, feat_names=(), plot=False, verbose=False)
Apply a cross-validation procedure to find the best regularisation parameters among the list of alphas given (ndim alpha must be == 1, and len(alphas)>1). If there are several subjects, will return a list of best alphas for each subjetc individually. User is expected to re-fit TRF fr each subject using their best individual alpha.
For a single subject (y is 2-dimensional), the TRF stored is the one with best alpha.
Notes
The cross-validation procedure is a simple K-fold procedure with shuffling of samples. This is prone to some leakage since lags span several contiguous samples…