pyeeg.models.TRFEstimator.multialpha_score
- TRFEstimator.multialpha_score(X, y)
Score the fitted multi-alpha models against held-out data.
Computes the per-channel correlation between the data predicted by the coefficients stored in
all_betas(one solution per alpha) and the true targety. The estimator must have been fitted with an array of severalalphavalues at once.- Parameters:
X (ndarray or list of ndarray) – Feature matrix (already lagged or not). A list of segments is accepted and must match
yin length; scores are averaged across segments.y (ndarray or list of ndarray) – EEG data, shape (nsamples, nchans) for a single subject or (nsubjects, nsamples, nchans) for several subjects.
- Returns:
scores – Array of shape (nsegments_or_subjects, n_alphas, n_chans) containing the per-channel correlation score for each alpha.
- Return type:
ndarray