Skip to main content
Log in

A brain–computer interface for the continuous, real-time monitoring of working memory load in real-world environments

  • Research Article
  • Published:
Cognitive Neurodynamics Aims and scope Submit manuscript

Abstract

We developed a brain–computer interface (BCI) able to continuously monitor working memory (WM) load in real-time (considering the last 2.5 s of brain activity). The BCI is based on biomarkers derived from spectral properties of non-invasive electroencephalography (EEG), subsequently classified by a linear discriminant analysis classifier. The BCI was trained on a visual WM task, tested in a real-time visual WM task, and further validated in a real-time cross task (mental arithmetic). Throughout each trial of the cross task, subjects were given real or sham feedback about their WM load. At the end of the trial, subjects were asked whether the feedback provided was real or sham. The high rate of correct answers provided by the subjects validated not only the global behaviour of the WM-load feedback, but also its real-time dynamics. On average, subjects were able to provide a correct answer 82% of the time, with one subject having 100% accuracy. Possible cognitive and motor confounding factors were disentangled to support the claim that our EEG-based markers correspond indeed to WM.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

References

  • Allison BZ, Neuper C (2010) Could anyone use a BCI? In: Tan D, Nijholt A (eds) Brain–computer interfaces. Springer, Berlin, pp 35–54

    Chapter  Google Scholar 

  • Antonenko P, Paas F, Grabner R, Van Gog T (2010) Using electroencephalography to measure cognitive load. Educ Psychol Rev 22(4):425–438

    Article  Google Scholar 

  • Awh E, Vogel EK, Oh S-H (2006) Interactions between attention and working memory. Neuroscience 139(1):201–208

    Article  CAS  PubMed  Google Scholar 

  • Baddeley A (1992) Working memory. Science 255(5044):556–559

    Article  CAS  PubMed  Google Scholar 

  • Baddeley A (2003) Working memory: looking back and looking forward. Nat Rev Neurosci 4(10):829–839

    Article  CAS  PubMed  Google Scholar 

  • Baddeley AD (2017) The concept of working memory: a view of its current state and probable future development. In: Exploring working memory. Routledge, Abingdon, pp 99–106

  • Baldwin CL, Penaranda B (2012) Adaptive training using an artificial neural network and EEG metrics for within-and cross-task workload classification. NeuroImage 59(1):48–56

    Article  PubMed  Google Scholar 

  • Berka C, Levendowski DJ, Cvetinovic MM, Petrovic MM, Davis G, Lumicao MN, Zivkovic VT, Popovic MV, Olmstead R (2004) Real-time analysis of EEG indexes of alertness, cognition, and memory acquired with a wireless EEG headset. Int J Hum-Comput Interact 17(2):151–170

    Article  Google Scholar 

  • Borghini G, Astolfi L, Vecchiato G, Mattia D, Babiloni F (2014) Measuring neurophysiological signals in aircraft pilots and car drivers for the assessment of mental workload, fatigue and drowsiness. Neurosci Biobehav Rev 44:58–75

    Article  PubMed  Google Scholar 

  • Cavanagh JF, Frank MJ (2014) Frontal theta as a mechanism for cognitive control. Trends Cogn Sci 18(8):414–421

    Article  PubMed  PubMed Central  Google Scholar 

  • Cheney W, Kincaid D (2009) Linear algebra: theory and applications. The Australian Mathematical Society, Canberra, p 110

    Google Scholar 

  • Cheng M, Lu Z, Wang H (2017) Regularized common spatial patterns with subject-to-subject transfer of EEG signals. Cogn Neurodyn 11(2):173–181

    Article  PubMed  Google Scholar 

  • Comstock Jr JR, Arnegard RJ (1992) The multi-attribute task battery for human operator workload and strategic behavior research

  • Cowan N (1999) An embedded-processes model of working memory. In: Miyake A, Shah P (eds) Models of working memory: mechanisms of active maintenance and executive control, vol 20. Cambridge University Press, Cambridge, p 506

    Google Scholar 

  • Cragg L, Richardson S, Hubber PJ, Keeble S, Gilmore C (2017) When is working memory important for arithmetic? The impact of strategy and age. PLoS ONE 12(12):e0188693

    Article  PubMed  PubMed Central  CAS  Google Scholar 

  • de Fockert JW, Rees G, Frith CD, Lavie N (2001) The role of working memory in visual selective attention. Science 291(5509):1803–1806

    Article  PubMed  Google Scholar 

  • Dehais F, Duprès A, Blum S, Drougard N, Scannella S, Roy RN, Lotte F (2019) Monitoring pilot’s mental workload using ERPs and spectral power with a six-dry-electrode EEG system in real flight conditions. Sensors 19(6):1324

    Article  PubMed Central  Google Scholar 

  • Di Flumeri G, Borghini G, Aricò P, Sciaraffa N, Lanzi P, Pozzi S, Vignali V, Lantieri C, Bichicchi A, Simone A et al (2018) EEG-based mental workload neurometric to evaluate the impact of different traffic and road conditions in real driving settings. Front Hum Neurosci 12:509

    Article  PubMed  PubMed Central  Google Scholar 

  • Downing PE (2000) Interactions between visual working memory and selective attention. Psychol Sci 11(6):467–473

    Article  CAS  PubMed  Google Scholar 

  • Erdogmus D, Adami A, Pavel M, Lan T, Mathan S, Whitlow S, Dorneich M (2005) Cognitive state estimation based on EEG for augmented cognition. In: Conference proceedings. 2nd international IEEE EMBS conference on neural engineering, 2005. IEEE, pp 566–569

  • Ericsson KA, Delaney PF (1999) Working memory in everyday skilled performance. In: Miyake A, Shah P (eds) Models of working memory: mechanisms of active maintenance and executive control, vol 20. Cambridge University Press, Cambridge, p 274

    Google Scholar 

  • Farwell LA, Donchin E (1988) Talking off the top of your head: toward a mental prosthesis utilizing event-related brain potentials. Electroencephalogr Clin Neurophysiol 70(6):510–523

    Article  CAS  PubMed  Google Scholar 

  • Fisher RA (1936) The use of multiple measurements in taxonomic problems. Ann Eugen 7(2):179–188

    Article  Google Scholar 

  • Gaume A, Vialatte A, Mora-Sánchez A, Ramdani C, Vialatte F (2016) A psychoengineering paradigm for the neurocognitive mechanisms of biofeedback and neurofeedback. Neurosci Biobehav Rev 68:891–910

    Article  CAS  PubMed  Google Scholar 

  • Gaume A, Dreyfus G, Vialatte F-B (2019) A cognitive brain–computer interface monitoring sustained attentional variations during a continuous task. Cogn Neurodyn 13(3):257–269

    Article  PubMed  PubMed Central  Google Scholar 

  • Gerjets P, Walter C, Rosenstiel W, Bogdan M, Zander TO (2014) Cognitive state monitoring and the design of adaptive instruction in digital environments: lessons learned from cognitive workload assessment using a passive brain–computer interface approach. Front Neurosci 8:385

    PubMed  PubMed Central  Google Scholar 

  • Gevins A, Smith ME, Leong H, McEvoy L, Whitfield S, Du R, Rush G (1998) Monitoring working memory load during computer-based tasks with EEG pattern recognition methods. Hum Factors J Hum Factors Ergon Soc 40(1):79–91

    Article  CAS  Google Scholar 

  • Grimes D, Tan DS, Hudson SE, Shenoy P, Rao RP (2008) Feasibility and pragmatics of classifying working memory load with an electroencephalograph. In: Proceedings of the SIGCHI conference on human factors in computing systems. ACM, New York, pp 835–844

  • Haapalainen E, Kim S, Forlizzi JF, Dey AK (2010) Psycho-physiological measures for assessing cognitive load. In: Proceedings of the 12th ACM international conference on Ubiquitous computing. ACM, New York, pp 301–310

  • Haenschel C, Baldeweg T, Croft RJ, Whittington M, Gruzelier J (2000) Gamma and beta frequency oscillations in response to novel auditory stimuli: a comparison of human electroencephalogram (EEG) data with in vitro models. Proc Natl Acad Sci 97(13):7645–7650

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Hart SG, Staveland LE (1988) Development of NASA-TLX (task load index): results of empirical and theoretical research. Adv Psychol 52:139–183

    Article  Google Scholar 

  • Heger D, Putze F, Schultz T (2010) Online workload recognition from EEG data during cognitive tests and human–machine interaction. In: Annual conference on artificial intelligence. Springer, Berlin, pp 410–417

  • Hinterberger T, Kübler A, Kaiser J, Neumann N, Birbaumer N (2003) A brain–computer interface (BCI) for the locked-in: comparison of different EEG classifications for the thought translation device. Clin Neurophysiol 114(3):416–425

    Article  PubMed  Google Scholar 

  • Jensen O, Tesche CD (2002) Frontal theta activity in humans increases with memory load in a working memory task. Eur J Neurosci 15(8):1395–1399

    Article  PubMed  Google Scholar 

  • Jensen O, Gelfand J, Kounios J, Lisman JE (2002) Oscillations in the alpha band (9–12 Hz) increase with memory load during retention in a short-term memory task. Cereb Cortex 12(8):877–882

    Article  PubMed  Google Scholar 

  • Khasnobish A, Datta S, Bose R, Tibarewala D, Konar A (2017) Analyzing text recognition from tactually evoked EEG. Cogn Neurodyn 11(6):501–513

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Kintsch W, Patel VL, Ericsson KA (1999) The role of long-term working memory in text comprehension. Psychologia 42(4):186–198

    Google Scholar 

  • Kleiner M, Brainard D, Pelli D, Ingling A, Murray R, Broussard C (2007) What’s new in psychtoolbox-3. Perception 36(14):1

    Google Scholar 

  • Kohavi R et al (1995) A study of cross-validation and bootstrap for accuracy estimation and model selection. IJCAI 14:1137–1145

    Google Scholar 

  • Kohlmorgen J, Dornhege G, Braun M, Blankertz B, Müller K-R, Curio G, Hagemann K, Bruns A, Schrauf M, Kincses W et al (2007) Improving human performance in a real operating environment through real-time mental workload detection. In: Dornhege G, Millán JR, Hinterberger T, McFarland D (eds) Toward brain–computer interfacing. MIT Press, Cambridge, pp 409–422

    Google Scholar 

  • Koles ZJ, Lazar MS, Zhou SZ (1990) Spatial patterns underlying population differences in the background EEG. Brain Topogr 2(4):275–284

    Article  CAS  PubMed  Google Scholar 

  • Lotte F, Larrue F, Mühl C (2013) Flaws in current human training protocols for spontaneous brain–computer interfaces: lessons learned from instructional design. Front Hum Neurosci 7:568

    Article  PubMed  PubMed Central  Google Scholar 

  • Lutz A (2002) Toward a neurophenomenology as an account of generative passages: a first empirical case study. Phenomenol Cogn Sci 1(2):133–167

    Article  Google Scholar 

  • Lutz A, Thompson E (2003) Neurophenomenology integrating subjective experience and brain dynamics in the neuroscience of consciousness. J Conscious Stud 10(9–10):31–52

    Google Scholar 

  • Mizuno K, Tanaka M, Yamaguti K, Kajimoto O, Kuratsune H, Watanabe Y (2011) Mental fatigue caused by prolonged cognitive load associated with sympathetic hyperactivity. Behav Brain Funct 7(1):17

    Article  PubMed  PubMed Central  Google Scholar 

  • Mohanchandra K, Saha S (2016) A communication paradigm using subvocalized speech: translating brain signals into speech. Augment Hum Res 1(1):3

    Article  Google Scholar 

  • Mora-Sánchez A, Gaume A, Dreyfus G, Vialatte F-B (2015) A cognitive brain–computer interface prototype for the continuous monitoring of visual working memory load. In: 2015 IEEE 25th international workshop on machine learning for signal processing (MLSP). IEEE, pp 1–5

  • Mora-Sánchez A, Dreyfus G, Vialatte F-B (2019) Scale-free behaviour and metastable brain-state switching driven by human cognition, an empirical approach. Cogn Neurodyn 13:1–16

    Article  Google Scholar 

  • Müller K-R, Tangermann M, Dornhege G, Krauledat M, Curio G, Blankertz B (2008) Machine learning for real-time single-trial EEG-analysis: from brain–computer interfacing to mental state monitoring. J Neurosci Methods 167(1):82–90

    Article  PubMed  Google Scholar 

  • Muller-Putz GR, Pfurtscheller G (2008) Control of an electrical prosthesis with an SSVEP-based BCI. IEEE Trans Biomed Eng 55(1):361–364

    Article  PubMed  Google Scholar 

  • Mumtaz W, Vuong PL, Xia L, Malik AS, Rashid RBA (2017) An EEG-based machine learning method to screen alcohol use disorder. Cogn Neurodyn 11(2):161–171

    Article  PubMed  Google Scholar 

  • Nasrabadi NM (2007) Pattern recognition and machine learning. J Electron Imaging 16(4):049901

    Article  Google Scholar 

  • Paas F, Renkl A, Sweller J (2003) Cognitive load theory and instructional design: recent developments. Educ Psychol 38(1):1–4

    Article  Google Scholar 

  • Sanchez G, Daunizeau J, Maby E, Bertrand O, Bompas A, Mattout J (2014) Toward a new application of real-time electrophysiology: online optimization of cognitive neurosciences hypothesis testing. Brain Sci 4(1):49–72

    Article  PubMed  PubMed Central  Google Scholar 

  • Sauseng P, Klimesch W, Doppelmayr M, Pecherstorfer T, Freunberger R, Hanslmayr S (2005a) EEG alpha synchronization and functional coupling during top-down processing in a working memory task. Hum Brain Mapp 26(2):148–155

    Article  PubMed  PubMed Central  Google Scholar 

  • Sauseng P, Klimesch W, Schabus M, Doppelmayr M (2005b) Fronto-parietal EEG coherence in theta and upper alpha reflect central executive functions of working memory. Int J Psychophysiol 57(2):97–103

    Article  PubMed  Google Scholar 

  • Shorrock ST (2005) Errors of memory in air traffic control. Saf Sci 43(8):571–588

    Article  Google Scholar 

  • Stoppiglia H, Dreyfus G, Dubois R, Oussar Y (2003) Ranking a random feature for variable and feature selection. J Mach Learn Res 3:1399–1414

    Google Scholar 

  • Strijkstra AM, Beersma DG, Drayer B, Halbesma N, Daan S (2003) Subjective sleepiness correlates negatively with global alpha (8–12 Hz) and positively with central frontal theta (4–8 Hz) frequencies in the human resting awake electroencephalogram. Neurosci Lett 340(1):17–20

    Article  CAS  PubMed  Google Scholar 

  • Sweller J (2011) Cognitive load theory. In: Mestre JP, Ross BH (eds) Psychology of learning and motivation, vol 55. Elsevier, New-York, pp 37–76

    Chapter  Google Scholar 

  • Swets JA (2014) Signal detection theory and ROC analysis in psychology and diagnostics: collected papers. Psychology Press, Hove

    Book  Google Scholar 

  • Tafreshi TF, Daliri MR, Ghodousi M (2019) Functional and effective connectivity based features of EEG signals for object recognition. Cogn Neurodyn 13(6):555–566

    Article  PubMed  PubMed Central  Google Scholar 

  • Varela FJ (1996) Neurophenomenology: a methodological remedy for the hard problem. J Conscious Stud 3(4):330–349

    Google Scholar 

  • Varela FJ, Thompson E, Rosch E (2017) The embodied mind: cognitive science and human experience. MIT Press, Cambridge

    Book  Google Scholar 

  • Vialatte F-B, Cichocki A (2008) Split-test Bonferroni correction for QEEG statistical maps. Biol Cybern 98(4):295–303

    Article  PubMed  Google Scholar 

  • Vogel EK, McCollough AW, Machizawa MG (2005) Neural measures reveal individual differences in controlling access to working memory. Nature 438(7067):500–503

    Article  CAS  PubMed  Google Scholar 

  • Wilson GF, Russell CA (2003) Real-time assessment of mental workload using psychophysiological measures and artificial neural networks. Hum Factors J Hum Factors Ergon Soc 45(4):635–644

    Article  Google Scholar 

  • Wolpaw JR, Birbaumer N, Heetderks WJ, McFarland DJ, Peckham PH, Schalk G, Donchin E, Quatrano LA, Robinson CJ, Vaughan TM et al (2000) Brain–computer interface technology: a review of the first international meeting. IEEE Trans Rehabil Eng 8(2):164–173

    Article  CAS  PubMed  Google Scholar 

  • Zander TO, Kothe C (2011) Towards passive brain–computer interfaces: applying brain–computer interface technology to human–machine systems in general. J Neural Eng 8(2):025005

    Article  PubMed  Google Scholar 

  • Zarjam P, Epps J, Chen F (2011) Characterizing working memory load using EEG delta activity. In: Signal processing conference, 2011 19th European. IEEE, pp 1554–1558

  • Zeng H, Yang C, Dai G, Qin F, Zhang J, Kong W (2018) EEG classification of driver mental states by deep learning. Cogn Neurodyn 12(6):597–606

    Article  PubMed  PubMed Central  Google Scholar 

Download references

Funding

This work was supported by a Consejo Nacional de Ciencia y Tecnología (Mexican government) grant (to A.M.-S.).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to François-Benoît Vialatte.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix 1: Images used for Task 1

Figures used to determine the memory span

Geometric Shapes

Fruits

Landscape

Circle

Apple

House

Pentagon

Banana

Building

Square

Orange

Church

Rhombus

Pear

Castle

Cross

Grape

Bridge

Star

Watermelon

Tower

Triangle

Pineapple

Tree

Figures used for the test

Animals

Vehicles

Supplies

Clothes

Cat

Plane

Book

Trousers

Deer

Train

Scissors

Shirt

Dog

Skateboard

Pen

Hat

Elephant

Truck

Ruler

Shoes

Penguin

Car

Backpack

Socks

Snake

Ship

Compass

Belt

Turtle

Bicycle

Set square

Tie

Appendix 2: Technical aspects of the BCI system

Offline study: designing the BCI

The offline study was a feasibility study, in which the constrains that would be encountered online were taken into account and reproduced. Examples of the online constraints include low latency of the online system (and therefore only a low number of features can be afforded for a quick analysis), limited calibration data for short calibration sessions, and the inability to remove artifacts such as eye-blinks. We called these parameters \(P_1, P_2, P_3, \ldots \), and an acceptable range of each of them was determined. For different combinations of the acceptable parameters, the following pipeline was performed:

  1. (1)

    20 subjects performed Task 1 while wearing the EEG set. Frequencies below 1 Hz and above 45 Hz were removed from the EEG signal with a 3rd order Butterworth filter. The EEG data were segmented into epochs of \(P_1\) seconds.

  2. (2)

    A subject \(s_i\) was removed from the dataset. The data of subject \(s_i\) were divided into two subsets, one subset with \(P_2\) epochs that will simulate the calibration session (“Online tests: the calibration session” section), and another subset with the remaining epochs. The calibration data and the data from the remaining subjects were used as training data. The data from the subject that were not part of the calibration data were used as testing data.

  3. (3)

    For the training data, each epoch was visually inspected and all the epochs contaminated with noise or muscular artifacts were rejected. In particular, epochs with eye-blinks or with arousal flags were rejected. An arousal flag was placed on an epoch if ether a distracter or the target was displayed during its course. During preliminary tests, subjects had reported an arousal effect due to the appearance of distracters or targets. The testing data were not cleaned.

  4. (4)

    For both the training and the testing data, spectral features were extracted using the Matlab p-Welch function, with a Hamming window of 0.5 s. The spectral features were absolute and relative power in the following bands: delta (1–4 Hz), theta (4–8 Hz), alpha (8–12 Hz), lower beta (12–20 Hz), upper beta (20–30 Hz) and lower gamma (30–45 Hz). The relative power in a band is the fraction of the total power in that band. The latter being normalised has the advantage of reducing inter-subject variability. Having 16 channels, 2 features per band, and 6 bands, we obtained 192 features for each epoch.

  5. (5)

    The calibration data were expanded by adding noisy copies. Enough noisy copies were created so that the number of epochs of the expanded calibration data divided by the number of epochs of the total training dataset equalled \(P_3\). The noise added was Gaussian noise with zero mean and standard deviation equal to \(P_4\) times the standard deviation of the feature.

  6. (6)

    To select relevant features, orthogonal forward regression (OFR) (Stoppiglia et al. 2003) was performed on the above matrix, the best \(P_5\) features were kept. OFR is a linear regression technique that can be used as a supervised feature selection technique. In the first step of OFR, features are ranked in order of decreasing correlation to the classifier output; the first selected feature is the top-ranking feature. In the second step, all remaining features, and the output, are orthogonalized with respect to the first selected feature, thereby discarding the part of the output that was explained by that feature; the projected features are ranked in order of decreasing correlation to the projected output, and the top-ranking feature is selected. Orthogonalization, ranking and selection are iterated until \(P_5\) features are selected. OFR was used instead of other common procedures such as Common Spatial Pattern (CSP) (Koles et al. 1990; Cheng et al. 2017) in order to minimise the number of required sensors for future implementations. In addition, the weighted average of features from different sensors is similar to the spatial average provided by CSP.

  7. (7)

    A linear discriminant analysis [LDA (Fisher 1936)] classifier was trained with the selected features and their corresponding labels (high or low-WM load). The output of the classifier is the posterior probability that the EEG segment belongs to the high-WM-load condition. A typically high-WM-load segment then would have a high posterior probability, therefore we defined the WMLE as the posterior probability.

  8. (8)

    We performed cross-validation by iterating over all possible subjects \(s_i\) for a given set of possible parameters (\(P_1\), \(P_2\), \(P_3\), \(P_4\), \(P_5\)), the performance of the classifier measured as the AUC was computed as a function of said parameters. The set of parameters that maximised the performance of the classifier was chosen, in other words, the parameters were optimised by cross-validation. Cross-validation is a family of techniques to asses a model’s ability to generalise when faced with new data, in this case, the testing data that were removed from the dataset. The reader interested in the topic can consult (Kohavi 1995) for a more in-depth discussion.

The set of parameters that represented the best trade-off between classification performance and feasibility was chosen to build the actual BCI. The values are shown in Table 2.

It is important to notice that although optimising by cross-validation might overestimate the performance results, we did this only to design the classifier, and all the results presented in this work are online results. Online there was no hypothesis testing (parameter selection), therefore, as the BCI design (set of parameters) was fixed for the online tests, p value corrections are not necessary. Furthermore, even though the number of features was optimised by cross-validation, the set of features itself (step 6) was chosen inside every cross-validation fold (step 8).

Online analysis: from EEG recordings to a WMLE

The online experiments followed the procedure outlined in the previous section. As before, recordings started with a calibration session, calibration data were cleaned and then added to the cleaned data from the 20 subjects recorded offline. This time however the set of parameters (\(P_1\), \(P_2\), \(P_3\), \(P_4\), \(P_5\)) was already set, and the pipeline described in the previous section was performed with the values of the Table 2.

Figure 8 shows how the information from the previous section (offline study) is integrated with that in this section (calibration) to select a good set of features and train the classifier that was designed offline.

Fig. 8
figure 8

Design methodology

Afterwards, the BCI is able to provide a WMLE. A continuous stream of data is analysed. A sliding window including the last 2.5 s of EEG is used as input.

Appendix 3: Arithmetic operations in Task 2

A random sequence of digits \({d_1, d_2, \ldots , d_n}\) was presented to the subjects in each trial. Three possible ways of manipulating the digits were suggested to the subjects, who were asked to choose the one that felt more resource demanding for them:

  • Progressive multiplication. Multiply \(d_1 d_2 \ldots d_i\) until time is over

  • Pairwise multiplication and successive addition. Multiply \(d_1\) and \(d_2\) and store the result. Add the result to the product of \(d_3\) and \(d_4\), replace the result. Add the result to the product of \(d_5\) and \(d_6\), replace the result. Continue until time is over.

  • Free choice. Subjects comfortable with their arithmetic skills were left to choose the structure of the operations, provided they maintained a high level of use of their mental resources.

Appendix 4: Estimation of statistical significance

We developed a method to estimate analytically the statistical significance of the performance of a two-class classifier. The null hypothesis is that the results come from a random classifier, whereas the alternative hypothesis is that the classifier is based on informative features. The first step towards estimating significance, then, is to choose a random classifier and to determine its success rate. Let us assume that our dataset consists of N examples, with \(N_1\) examples of class 1 and \(N-N_1\) examples of class 2, with \(N_1 \ge N/2\). The best that a random classifier can do is to take into account the prior probabilities of the classes. Denoting by q the prior probability of class 1, assumed to be larger than 0.5, and estimated by \(N_1/N\), a possible random classification rule is to assign any object to class 1 with probability q. The probability of correct classification of this classifier (which can be estimated by its rate of correct classification) is given by : \(c_0 = q^2 + (1-q)^2\). Let us define a random variable whose realisation \(z_i\), for example i, is

$$\begin{aligned} z_i = {\left\{ \begin{array}{ll} 1 &{}\text {if the random classifier classified example } i \text { correctly} \\ 0 &{}\text {otherwise} \end{array}\right. } \end{aligned}$$

The total number of successes, \(Z = \sum _{i = 1}^N z_i\), follows a binomial distribution \( Z \sim B(N,c_0) \), and hence the probability of obtaining exactly k successes is

$$\begin{aligned} Pr(Z = k) = \left( {\begin{array}{c}N\\ k\end{array}}\right) c_0^k(1-c_0)^{N-k} \end{aligned}$$

The p value is, by definition, the probability of obtaining results at least as extreme as the observed ones, assuming that the null hypothesis is true. Our goal is to compare a random classifier with a particular classifier that yielded c correct answers. In this case, “results as extreme” means observing at least c correct answers in a random classifier. Therefore, the p value associated with the null hypothesis defined above can be computed as

$$\begin{aligned} p = \sum _{k=c}^N Pr(Z = k) \end{aligned}$$

In general, the use of any other random classifier would lead to a different \(c_0\). In particular, the most efficient classification rule under complete lack of informative predictors is the zero classifier, that assigns all the objects to the largest class. In the above notation, the rate of correct classification of a zero classifier is \(c_{0z} = q\). As, by definition, \(0.5< q < 1\), it is easy to show that \(c_{0z} > c_0\) for all q. However, although the zero classifier is the best classification rule when no relevant predictors are available, for a zero classifier \(Pr(Z = k) =0\) if \(k\ne N_1\) (by definition a zero classifier can correctly predict only \(N_1\) objects). Therefore, for any classifier with a number of correct predictions larger than \(N_1\), p would be zero. It is a good practice to compare classification results with those of a zero classifier when facing imbalanced datasets. However, a zero classifier is not useful for computing p values.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Mora-Sánchez, A., Pulini, AA., Gaume, A. et al. A brain–computer interface for the continuous, real-time monitoring of working memory load in real-world environments. Cogn Neurodyn 14, 301–321 (2020). https://doi.org/10.1007/s11571-020-09573-x

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11571-020-09573-x

Keywords

Navigation