NeuroTechX / moabb

Mother of All BCI Benchmarks
https://neurotechx.github.io/moabb/
BSD 3-Clause "New" or "Revised" License
691 stars 178 forks source link

Statistics in MOABB #336

Open sylvchev opened 1 year ago

sylvchev commented 1 year ago

MOABB has a very good statistical methodology for experimental analysis and benchmarking algorithms. It could be a nice addition to reinforce these aspects with:

Regarding chance level, we simply use the limit when the number of samples tends to infinity (50% for 2 classes, 25% for 4 classes, etc). This chance level is a crude approximation and could be refined, either using the class sample balance (Better than random: a closer look on BCI results) or by characterizing the class sample distribution (Exceeding chance level by chance)

bruAristimunha commented 1 year ago

Hi @sylvchev,

Do you have the biomodal implemented somewhere?

sylvchev commented 1 year ago

Yes, the paper is here, their matlab code is here and my python version is:

def chance_level(nbepoch, nbclass, alpham=0.01):
    # nbepoch = length(y);
    # nbclass =  length(unique(y));
    threhold = binom.ppf(1-alpham, nbepoch, 1/nbclass) * 100/nbepoch
    return threhold

alpham is the target p-value (for example 0.01)