How to get the decision value of each time point in each epoch?

Hi! Alex,
Thank you very much for your reply :sparkling_heart:, actually I had solved that problem with ‘mne.decoding.SlidingEstimator’, which helps me to train and test at each time point. But I have a new question, which is how to get the decision value of each time point in each epoch, here is my code snippet:

scores = []
epochs_data_train = epochs_train.get_data()
cv = LeaveOneOut()
clf = make_pipeline(LinearDiscriminantAnalysis(solver='lsqr', shrinkage='auto'), verbose=True)
time_decod = SlidingEstimator(clf, n_jobs=-1, scoring=None, verbose=True) # scoring: Score function (or loss function).
scores_fea_col = cross_val_multiscore(time_decod, epochs_data_train, labels_fea_col, cv=cv, n_jobs=-1)

the contents of ‘scores_fea_col’ is a ndarray which gives 0 or 1 for each time point in each epoch, but no decision value returns, I’m so confused how to get the decision value, and I found a method called decision_function (X), the interpretation of it is: Estimate distances of each data slice to the hyperplanes. I think it’s what I need, but, I don’t know how to combine this decision_function(X) with my code above. Do you know how to do it?(very hope you know :relaxed:)
And another question is if it is okay to leave the scoring=None in the time_decod = SlidingEstimator(clf, n_jobs=-1, scoring=None, verbose=True) , I have no idea what is the appropriate loss function should be applied here for the LDA. Do you have any suggestions?
Thank you again, you guys are really nice and helpful @richard @agramfort , and I appreciate very very very much :heart: :heart: :heart:

to get access to the decision function I fear you need to get inspiration from the mne code:

you will have to modify it for your needs to copy it somewhere.

Alex