pyeeg.models
.TRFEstimator.score
- TRFEstimator.score(Xtest, ytrue, scoring='corr', reduce_multi=None)
Compute a score of the model given true target and estimated target from
Xtest
.- Parameters:
Xtest (ndarray) – Array used to get “yhat” estimate from model
ytrue (ndarray) – True target
scoring (str (or func in future?)) – Scoring function to be used (“corr”, “rmse”, “mse”)
reduce_multi (None or callable or str) – The score by default return the score for each output (channel). However, sklearn pipelines for cross-validation might require a single number from the scorring function. This can be achieved by _reducing_ the scores either by taking the mean or the sum across channels (respectively with ‘mean’ or ‘sum’). If a callable is used, its signature must be (1d-ndarray) -> float, similar to
np.mean()
.
- Returns:
Score value computed on whole segment.
- Return type:
float