1 Introduction

Brain-Computer Interface (BCI) is an evolving  technique that is growing towards novel applications in practical life. The key aim is to make a bridge between human neural systems and the external world which accelerates the communication between them through interacting with electronic techniques. A BCI is a framework for exchanging messages between the brain as well as the computer, a very successful technology for a person with severe movement disability, via which a person can communicate for the requirements using his/ her brain impulses, even in the absence of a normal computer system channel. The initial concept of BCI involved using brainwave signals to control prosthetic limbs and perform tasks such as grasping and reaching, but the applications of BCI have since expanded to include a wide range of functions, such as communication, environmental control, and entertainment. The technology works by capturing brain signals using sensors placed on the scalp or implanted directly into the brain. These signals are then processed using machine learning algorithms to identify patterns and decode the user's intentions. The decoded signals can then be used to control different devices, viz. wheelchair, enabling individuals with disabilities to interact with their environment more effectively. BCI technology holds great promise for individuals with disabilities, providing them with new ways to communicate, move, and interact with the world [1, 2].

Three types are available of BCI, invasive, semi-invasive & non-invasive on the basis of attainment of the brain signal [3]. In a non–invasive fashion, EEG is the most frequently chosen model for collecting brain signals for BCI systems because of the economical nature and quality to capture of BCI systems. There is an equilibrium between temporal resolution and spatial resolution while using EEG signal acquisition. [4] EEG signal processing technique low spatial resolution problem hindered mental task detection objective. In the case of EEG signal processing step, the researchers have used several different techniques of feature extraction to classify the BCI research area for better modelling of EEG signals. There are some techniques of feature extraction for example, autoregressive (AR), adaptive AR (AAR) parameters [5], Statistical methods (SMs), power spectral density (PSD) [6], and Phase Locking Value (PLV). The non-stationary and non-linear EEG signals are decomposed into smaller frequency components by using, Empirical Mode Decomposition (EMD) and Discrete Wavelet transform (DWT) [7]. The main drawbacks of these techniques are low frequency. Also, both methods may not deal with efficiently different overlapping frequency bands which are present in the EEG. Unfortunately, determining the user’s mental state from EEG data is difficult because of the noise, non-stationary, complexity, and high dimensionality of such signals. As a result, recognizing mental situations from EEG signals demands the use of particular signal processing and machine learning technologies. First, we go over the various EEG signal processing methods that can be employed in BCI, and the best and cross combination of algorithms is applied to detect the mental state of the brain.

The next step in the research is to figure out how to solve the Trade-off issue between different BCI models. In this proposed work, transform the high spatial resolution imaging technique fMRI into EEG technique to resolve the low spatial resolution problem of EEG. Low-frequency decomposition and different overlapping frequency bands are the main drawbacks of various feature extraction techniques. The utility of the best-suited algorithm based on PSD for feature extraction will be compared and discussed to resolve these problems. To improve the generalized performance, there is a new approach to machine learning which is called data fusion from various sets of features by using the information with multiple views. Multi-view learning or fusion of data has advanced and developed rapidly in recent years, but it also faces lots of new problems [8], [8]. In the BCI realm, this approach can be employed in a variety of ways to represent the EEG signal in a meaningful fashion. The key feature of BCI is preventive and curable, thus it essentially explores the improvement in cognitive function of recurrent strokes using modern neurorehabilitation methods. The BCI, as a novel technique, not only evaluates the functionalities of rehabilitation cognitive capability but also the efficiency of cognitive impairment after strokes [7]. It has major importance for the early identification of disease and treating cognitive impairment after a stroke involves a multidisciplinary approach that may include medication, rehabilitation, and lifestyle changes. Medications such as cholinesterase inhibitors and memantine can improve cognitive function in some stroke survivors with cognitive impairment. Rehabilitation may involve physical therapy, occupational therapy, and speech therapy to improve motor skills, memory, and communication abilities. Lifestyle changes such as regular exercise, healthy eating, and social engagement may also help improve cognitive function after a stroke. This includes controlling blood pressure, managing diabetes, reducing high cholesterol, and not smoking. Regular exercise, a healthy diet, and cognitive stimulation through activities such as reading, puzzles, and social interaction may also help prevent cognitive decline. Consultation with a healthcare professional is recommended to determine the most appropriate course of action. After the introduction, the problem and related work is elaborated in Sect. 2 afterword we explained EEG signal analysis in Sect. 3. Then, research areas and methods are described in Sect. 4. The results and discussion are given in Sect. 5. Finally, the highlights of the conclusion and future scope are given in Sect. 6.

2 The Problem and Related Works

As soon as Rosenfeld et al. [10] 1969 detected audio reactions and amplified them visually in animals. Following this, Prof. Vidal of California University, developed BCI to achieve a technology to read the signals of the brain [11]. It wasn't until 1977 that Aranibar and Pfurtscheller conducted experiments to demonstrate that moving or envisioning moving specific body parts could cause changes in the frequency spectrum of EEG alpha (8–12 Hz) and beta (12–25 Hz) signals in the motor brain region. These changes would take place both at the start of the movement and throughout the process of migration. The very first human neurofeedback BCI was created as a result [12]. Depending on the method of signal acquisition, BCI can be classified as either non-invasive or invasive. The direct collection of human brain signals from the scalp using non-invasive BCI is a technology that is safer, and more practical. EEG is the most widely utilized signal acquisition technique for non-invasive BCIs. Depending on where the EEG stimulation comes from, these systems are classified as exogenous and endogenous BCI. Exogenous BCI is the term used to describe EEG signal patterns caused by external stimulations described in [13,14,15]. For patients with complicated eye impairment developed [16]. In order to make the previously used ASSR stimuli more logical and natural given in [17]. Jiang et al. created ERP-NF-BCI platform-based novel BCI systems, that use neurofeedback for communicating with the brain during training. Using a wireless EEG headset, the individuals' brain electrical outputs were collected during the training procedure. Subjects were taught to focus on activities associated with a stimulus at any particular time or to overlook an extraneous stimulus. Patients improved target visual stimulus attention abilities and trained the EPR-NF-BCI to do so [18]. BCI novel BCI systems based on P300 are the most well-liked of all these systems because of their excellent classification accuracy and quick information transfer rate (ITR). Additionally, Alcaide-Aguirre et al. hold-release function allow for quicker (approx. 16 times) and more incessant control of P300 [19], and adjustments to patients' auditory and visual senses have an impact on its performance [20]. However, eye fatigue is frequently experienced and epileptic seizures can occasionally be brought on when SSVEP-BC-based visual stimuli are used with older patients. The self-modulating EEG signal patterns are reported in [21] and [22]. In recent years several works have been done to understand the EEG brain’s mental state. A number of image-processing techniques of EEG have been studied in this proposed work. All of the techniques have their own limitations like Spatial and temporal resolution trade-off issues. In a feature extraction technique, frequency overlapping and decomposition is an issue in recent works. The learning algorithms are another big issue in classification accuracy and their learning step size.

3 EEG Signal Processing for Brain Analysis

Signal processing is an integral part of the analysis of EEG which is used in BCI. After the collection of datasets, we went through the process of brain analysis as Datasets description, pre-processing, parameter optimization, system calculation procedure, and evaluation metrics for the proposed analysis of Signal processing for mental State Recognition in BCI. The basic components of BCI are depicted in Fig. 1.

Fig. 1
figure 1

Basic component of BCI

EEG signal classification refers to the process of identifying patterns in EEG signals and categorizing them into different classes, typically representing different brain states or activities. Here are the general steps involved in EEG signal classification:

  1. 1.

    Data acquisition

EEG signals are acquired using electrodes placed on the scalp. The number and placement of electrodes depend on the specific research or clinical application.

  1. 2.

    Pre-processing

Raw EEG signals contain various types of artifacts, such as eye blinks, muscle activity, and electrical noise. Pre-processing techniques, such as filtering, artifact removal, and baseline correction, are used to remove or minimize these artifacts.

  1. 3.

    Feature extraction

Relevant features are taken from the pre-processed EEG signals. The choice of features depends on the specific application, but common features include spectral power, time–frequency analysis, and connectivity measures.

  1. 4.

    Feature selection

In this step, a subset of the extracted features is selected based on their relevance and discriminative power. It will help in reducing the  dimensionality of the feature space which improves the classification performance.

  1. 5.

    Model training

A ML model is trained using the selected features and corresponding class labels. The selection of the technique depends on the particular application, but common models include support vector machines (SVM), neural networks (NN), and random forests (RF).

  1. 6.

    Model evaluation

The trained model is assured using a separate set of EEG signals that were not used for training. The performance of the model is typically evaluated using metrics like  accuracy, precision, recall, and F1-score.

  1. 7.

    Model optimization

The model parameters are optimized to improve their performance on the evaluation set. This may involve tuning hyperparameters, modifying the feature selection process, or adjusting the classification algorithm.

  1. 8.

    Deployment

The final trained and optimized model can be used in a medical or research field to classify new EEG signals into different classes.

3.1 Dataset Description

The key objective of the system is to a comparative meta-analysis of EEG Signal-processing Methods to recognize the Mental State of BCI in different patients based on various attributes. Data used in the preparation of this work were obtained from the “Physio Net Website database” [18].

The basic and first step of data analysis is the collection of Primary or Raw Data. After the collection and cleaning of the data, it gets processed and turns into the information form which is later on converted into Knowledge. It moves on the analysis track and generates some meaningful data. This section's major goal is to clear the key principles of collecting and analyzing the raw or primary data. It clears how it becomes a challenge to evolve meaningful information which enlightens emerging technologies and business processes.

In order to analyze an analog signal, such as EEG, it is often necessary to sample it and then analyze the samples. This is because digital systems can only process discrete values. The analog signal has been digitized by using analog-to-digital conversion (ADC), and it can be analyzed using various techniques, including the DFT. The DFT is a mathematical algorithm that is used to transform a time-domain signal into its frequency-domain representation. This allows us to analyze the signal in terms of its constituent frequencies, that can give valuable data about the underlying physiological processes. In the case of EEG analysis, the DFT can be used to identify specific frequency bands that are related to various mental conditions  and processes. For example, alpha waves with a frequency band (8–12 Hz) are associated with relaxation and meditation, while beta waves with a frequency band (12–30 Hz) are associated with alertness and cognitive processing. Overall, the use of digital signal processing techniques like the DFT has revolutionized the field of EEG analysis and has led to significant advances in our understanding of the brain and its function.

EEG is a method used to study brain function during different tasks or in different conditions. In this paper, the benchmark dataset consists of different states of subjects. This suggests that the researchers are interested in studying how the brain responds to mental arithmetic and whether there are any differences in brain activity before and during the task. Various kinds of analyses that could be done with this type of data. For example, the researchers could look at the overall level of brain activity before and during the task, or they could look at specific frequency bands or brain regions that are associated with mental arithmetic. They could also compare the EEG recordings of subjects who perform well on the task to those who do not, in order to identify any differences in brain activity that might be related to task performance. In this system, the scalp is divided into different regions, and electrodes are placed at specific points on the scalp based on these regions. The 30 Hz cut-off frequency high-pass filter was used to filter out low-frequency noise and slow drifts in the EEG signal. This filter passes frequencies above 30 Hz and attenuates frequencies below 30 Hz. A power line notch filter with a center frequency of 50 Hz was used to attenuate frequencies around 50 Hz and their harmonics. The EEG data were then processed using Independent Component Analysis (ICA) for identification and removal of artifacts such as eye movements, muscle activity, and cardiac activity. ICA separates the EEG signal into independent components, each of which represents a various source of neural activity or artifact. Components that correspond to artifacts can be identified based on their temporal and spatial characteristics and removed from the EEG data. The data was segmented into 60-s epochs, each of which was analyzed separately. During each epoch, the participant performed an arithmetic task.

Further, the participants eligible to enroll in the study must meet the following criteria:

  • No clinical manifestations of mental or cognitive impairment: The participants must not exhibit any signs or symptoms of mental or cognitive impairment, such as difficulty with memory, attention, or problem-solving.

  • No Learning disabilities (Verbal or non-verbal): The participants must not have any disabilities that affect their ability to learn through verbal or non-verbal means.

The exclusion criteria for the study are:

  • The use of psychoactive medication: Participants who are currently taking medication that affects their mental state or behavior are not eligible for the study.

  • Drug or alcohol addiction: Participants who have a history of drug or alcohol addiction are not eligible for the study.

  • Psychiatric or neurological complaints: Participants who have any current or past psychiatric or neurological complaints, such as depression or epilepsy, are not eligible for the study.

Further, the benchmark data set with EEG are provided in European Data Format (EDF) format, which is converted into CSV files. Each subject has two files, one of which first includes a recording of the subject's background EEG (before the mental arithmetic task) and the second contains a recording of the EEG during the mental arithmetic task.

3.2 Pre-Processing

Data preprocessing is a very important term for cleaning raw datasets. These techniques provide standard and reliable datasets. In data preprocessing we have done these steps profiling, cleaning, reduction, transformation, and validation, after that, we get the actual datasets for the proposed analysis of Signal processing for mental State Recognition in BCI. In data preprocessing, we have done two things for our proposed model feature extraction and selection.

Feature extraction is an important step in ML, and it involves transforming raw data into a set of numerical features that may be used to train an ML model. The process of feature extraction involves selecting and transforming the most relevant and informative attributes of the raw data while discarding irrelevant or redundant information. By doing this, the features become more discriminative, and they can better capture the underlying patterns in the data. Applying ML algorithms directly to unprocessed data can result in poor performance because of the noise, redundancy, and irrelevant information present in the data. Feature extraction helps to address this issue by providing a more compact and informative representation of the data. Further, “The initial phase in EEG signal processing is feature extraction, and it seeks to describe EEG signals using (typically) limited important values named "features." These features should be able to capture the information contained in EEG waves which is useful for describing the mental states to be identified while rejecting irrelevant data. The retrieved features are organized into the vector called “feature vector.”

Feature selection is an important step in ML and data analysis, which involves identifying and selecting a subset of input variables which are most pertinent for the prediction task at hand. The target of feature selection is to improve the performance of ML techniques by reducing the dimensionality of the input space, removing irrelevant or redundant features, and improving the model's interpretability. There are various techniques and algorithms for feature selection, some popular algorithms include the chi-square test, mutual information, correlation-based feature selection, recursive feature elimination, and Lasso regularization. The possibility of a feature selection technique depends on the type of data, the size of the feature space, the complexity of the model, and the performance requirements. A well-designed feature selection process can lead to better prediction accuracy, faster model training and testing, and improved model interpretability and generalization. This reduction in input variables reduces the computational cost of modeling as well as in some cases; it also improves the performance of the model.

3.3 Parameter Optimization

To remove the biasing problems in the proposed analysis of Signal processing for mental State Recognition in BCI, evaluation, and the standard parameters selection, we randomly select 70% of datasets for training, 15% of datasets for validation, and the remaining 15% of datasets for testing.

3.4 System Calculation Procedure

The objective of this research proposal is to identify the suggested analysis and comparative analysis of signal processing for mental state recognition in BCI. The system performance indicators find TPR (True Positive Rate) or sensitivity, TNR (True Negative Rate) or specificity, balanced accuracy, accuracy, error rate, precision, F1-score, recall, FNR (False Negative Rate) and FPR (False Positive Rate) are widely used in Mental State Recognition. The Mental State Recognition ability of proposed classifiers has usually been determined by the confusion matrix (CM) and the receiver operating characteristics (ROC) curve.

3.5 Evaluation Metrics for Proposed ML Model

Performance analysis is an integral part of machine learning (ML). In ML classification, accuracy, precision, sensitivity, and specificity are commonly used to evaluate performance. Accuracy measures how often the model correctly predicts the outcome, while precision measures the proportion of true positives among all positive predictions. Sensitivity measures the proportion of true positives among all actual positive cases, while specificity measures the proportion of true negatives among all actual negative cases. These metrics are essential in evaluating the basic reliability of a test. However, these metrics may not always be enough to provide a complete evaluation of the model's performance. For example, if a model predicts a positive outcome for a rare disease, even if it's wrong, it may still have high accuracy due to the low prevalence of the disease. In such cases, positive predictive value (PPV) and true positive rate (TPR) are also reported to provide a more realistic measure of the model's performance. Another important evaluation method is the area under the curve (AUC) of the receiver operating characteristic (ROC) curve. The ROC curve plots sensitivity against 1-specificity at various threshold settings, and the AUC represents the overall ability of the model to distinguish between positive and negative cases. The model is more accurate at predicting with the greater AUC. Overall, using a combination of these techniques can give a more accurate assessment of the performance of ML models.

3.6 Classification

In ML techniques one of the most important supervised learning concepts is a classification that essentially categorizes a set of data into classes. Speech Recognition (SR), Face Identification (FI), Handwriting Recognition (HR), Document Categorization (DC), etc., are some of the most predominant classification issues. It may be executed on structured or unstructured data. Data is categorized using this technique into a certain number of categories.

The classification phase refers to the process of identifying features from the signals that were collected during the second step. The classification algorithm is used to classify mental states. This process is also known as "feature translation." The term "classifiers" refers to classification algorithms.

3.7 Proposed Model for Signal Processing Techniques for Mental State Recognition in Brain-Computer Interfaces (BCI)

The data is used to train an algorithm or ML model to calculate the product you design your model to predict. Test data is utilized for performance analysis of the accuracy and efficiency, of the algorithm you are using to train the machine.

4 Research Area and Method

4.1 Signal Processing Algorithms for use in BCI

There are different steps involved in EEG signal processing given in Fig. 2. Each step uses different algorithms.

Fig. 2
figure 2

Steps involved in the BCI system

Step 1 Different pre-processing and signal-processing algorithms are used [23].

Step 2 Different digital signal processing steps such as sampling, quantization then encoding is used to get the desired digital signal from the analog signal (input).

Step 3 Analyze patient data for Identification of behavior and prediction is done by techniques used like data mining, machine learning, and statistics. The healthcare model provides key solutions at the macro and micro levels. Potential risks can be assessed by the use of prophetic analytics can vigilant health care experts to potential risks.

Step 4 Feature selection algorithms are used [23].

Step 5 Feature extraction algorithms are used [23].

Step 6 Classification algorithms are used [23].

Step 7 Prediction ML models is an emergent approach that helps in the prophecy, and diagnosis of a disease. In this paper, the best algorithm is discovered to be Kernel Naive Bayes, which is then followed by Linear SVM.

A collection of algorithms related to different stages of BCI operations. It's not easy to measure distinct brain waves throughout the EEG. Typical functionalities as determined by measuring procedures, such as data acquisition, processing, & presentation, should be implemented in such a system. The digital form of signals collected from electrodes is relatively insignificant. The next step is to do advanced signal pre-processing. Following that, an EEG signal may be analyzed for features. We can select from a variety of feature extraction techniques. Each one is designed to generate features that describe specified qualities of the signal in the current application to the maximum extent possible. During the selection process, it is frequently necessary to delete some superfluous features. Finally, feature vectors are used to implement the classification procedure. Then a control procedure can be carried out. Simultaneously, BCI system quality should be assessed. Noise, as well as a variety of physiological and technical abnormalities, has a significant impact on amplitudes. As a result, those signals must be thoroughly conditioned, and the finest algorithm for detecting the mental state of the brain is utilized.

In this proposed work a kernel algorithm will be used to provide the best-suited result. A combination of the different algorithms will be applied to the proposed model for getting improved mental state recognition in the BCI system.

Analysis of a set of relationships between individual points in a dataset is given below.

Mean of the sample (M): It is defined by the average value of the collected sample.

$$M = \frac{{\left( {\sum\nolimits_{(i = 1)}^{n} {u_{i} } } \right)}}{n}$$
(1)

The standard deviation (SD) of a dataset is a measurement of the spreading of data.

$$SD = \sqrt {\frac{{\sum\nolimits_{(i = 1)}^{n} {(v_{i} - M)^{2} } }}{(n - 1)}}$$
(2)

Variance is Similar to SD which is simply rectangular of it. Both of them are measures of the unfolding of the data.

$${s}_{2}=\frac{{\sum }_{i=1}^{n}{({u}_{i}-M)}^{2}}{(n-1)}$$
(3)

Variance and covariance both are used to find the degree of similarity. To find the similarity within the same function and for two different functions variance and covariance are used respectively. Variance can also be defined as a degree of deviation from the average value for points in a single dimension. The degree that each dimension deviates from the average value with respect to the others is measured by covariance., which is given below.

$$var\left(u\right)=\frac{\sum_{j=1}^{n}\left({u}_{j}-M\right)({u}_{j}-M)}{(n-1)}$$
(4)
$$cov\left(u, v\right)=\frac{\sum_{\mathrm{j}=1}^{\mathrm{n}}(\left({\mathrm{u}}_{\mathrm{j}}-{M}_{u}\right)\left({\mathrm{v}}_{\mathrm{j}}-{M}_{v}\right)}{(\mathrm{n}-1)}$$
(5)
$$cov\left(u,v\right)=cov(v,u)$$
(6)

The Covariance Matrix: A matrix has the covariance of any two variables in a high-dimension dataset, which is given below.

$${C}^{n\times n}=\left({c}_{i,j},{c}_{i,j}=cov\left({Dim}_{i}, {Dim}_{j}\right)\right)$$
(7)

Correlation: Technically, it refers to any of several more specific kinds of relationships between mean values, but it can also apply to any departure of two or more random variables from independence. The two variables, it is derived by the ratio between the covariance and product of their standard deviations., which is given below.

$${\rho }_{U,V}=\frac{cov\left(U,V\right)}{{\sigma }_{U}{\sigma }_{V}}$$
(8)
$${\rho }_{U,V}=\frac{E[(U-{M}_{U})(V-{M}_{V})}{{\sigma }_{U}{\sigma }_{V}}$$
(9)

where \(U\) and V are m × n matrix, m is a number of data types, i.e. the dimension, and n is each item data length.

4.2 Problem of reconciling spatial and temporal resolution

The spatial resolution (SR) is the amount of spatial detail in an observation, and the temporal resolution (TR) is the amount of temporal detail in an observation.

A BCI that is non-invasive and more convenient to use. It has at least three different BCI designs of this type have been created. The one where the electrical signal is monitored over the surface of the scalp is the most prevalent (electroencephalogram). Other non-invasive sensors put on the head's surface may theoretically use this. Magnetoencephalography (MEG), which monitors the brain's magnetic activity, and functional magnetic resonance imaging (fMRI), which analyses changes in oxygenation in active brain areas that can be seen in Fig. 3.

Fig. 3
figure 3

Reconciling spatial and temporal resolution problem

All of these methods can be used in a BCI instead of an fMRI, but they all have drawbacks. The MEG and fMRI equipment are bulky and expensive. Because fMRI has deprived temporal resolution, the goal of this study was to find a way to solve the trade-off problem between spatial and temporal resolution, transforming the high spatial resolution imaging technique fMRI to EEG technique to resolve the low spatial resolution problem of EEG [4]. In this proposed work a module will take the signal from EEG and fMRI and will be applied to the decomposition technique and compare its spectral component. Further, the product of this module will be superimposed fMRI to EEG for getting moderate or high spatial resolution.

4.3 Brain Oscillation Characteristics

The various waves developed in the human brain are discussed in Table 1. Table 2 shows the comparative study of slow oscillation and delta waves in Brain. 

Table 1 Comparative Study of different waves in brain
Table 2 Comparative Study of slow oscillation and delta waves in Brain

4.4 Techniques Trend

The old and new techniques for Brain imaging are discussed in Table 3 

Table 3 Comparative study of old and new techniques for brain imaging

4.5 Using Power Spectral Density to Extract Features

Measuring the power content vs. frequency of a signal is called a power spectral density (PSD). It’s deviousness of the average power of any arbitrary sequence and it can be categorized mainly into two types: (a). parametric; (b). nonparametric; [24]. Non-parametric methods including periodogram-based estimation are dependable and simple to use. The inability to generalize the finite length sequence for the data points is one of their drawbacks. Longer than the signal size, they do not give the required frequency resolution. One more disadvantage of this method is spectral leakage. A parametric method is given to alleviate the drawbacks of nonparametric methods.

In parametric techniques, the calculation of PSD values from a given signal is done by supposing the linear system's output is determined through white noise & then calculating the system's parameters. Some techniques and other examples of improvement in feature extraction algorithms are given in [25]. In this proposed work High-frequency resolution is provided by power spectral analysis. That combines with a multivariate approach to feature selection that gives advantages over other feature selection processes. These combined approaches give a minimal subclass of appropriate and non-redundant of data sets for feature selection. The approach for mental task sorting is given in Fig. 4.

Fig. 4
figure 4

The suggested approach for mental task sorting is depicted in a flow diagram

4.6 Multi-View Ensemble Learning (MEL)

Multi-view learning (MVL) is applied for supervised, semi-supervised, ensemble learning, active learning, etc. Consensus and complementary are very important principles for MVL. The following processes are involved in the learning process: Generation and ensemble of classifiers. SVM and KNN are two supervised learning classifiers in machine learning. SVM and KNN both methods are both very useful in complex pattern recognition in brain signal mapping [26]. SVM is less complex in terms of calculation as compared to KNN and easy to understand. The main disadvantage of SVM is it understands less set of patterns. However, KNN is very sophisticated to understand but can handle very complex pattern [27,28,29,30,31,32,33]. In this proposed work SVM and KNN works together for better classification.

If the learning models are not suited to the vision, Multi-view ensemble learning (MEL) performance will suffer. As a result, when selecting viewpoints, complimentary principles and consensus are considered to ensure the effectiveness of performance of MEL [9]. Rezaei et al. [34] and Zhiwei et al. [26] have shown lower accuracy for mental task. The proposed work will use DL and ML techniques to improve classification accuracy for mental task. Figure 5 shows the MEL approach For prediction.

Fig. 5
figure 5

MEL approach applied for prediction

The following parameters and metrics are used for comparative analysis of data-driven models for EEG Analysis

$$Fals = F;\;Positive = P;\;True = T;\;Negative = N;$$

Accuracy (A) How closely a measured value (M) and the actual value (true value (T)) differ is a measure of accuracy.

$$A=\frac{(TP+TN)}{\left(TP+TN+FP+FN\right)}$$
(10)

Precision (P) The degree of precision (P) indicates how closely the measured values (M) agree with one another.

$$P=\frac{TP}{TP+FP}$$
(11)

The Precision denotes how exact and precise your model is. How many of those anticipated positives turned out to be actual positives. A high False Positive determines a more accurate Precision value.

Recall (R) The fraction of the pertinent documents that are successfully recovered is known as recall (R).

$$R=\left(\frac{TP}{TP+FN}\right)$$
(12)

F-Score (F) It is referred to as the harmonic mean of recall and precision.

$$F = 2P\frac{R}{{\left( {P + R} \right)}}$$
(13)

Specificity or TNR To calculate specificity, divide the number of actual wrong forecasts by the total number of inaccurate forecasts.

$$specificity =\left(\frac{TN}{TN+FP}\right)$$
(14)

Error Rate (ER) It is measured as an error with respect to the database;

$$ER = ({\text{No}}\;{\text{of}}\;{\text{incorrect}}\;{\text{predictions}}){\text{/}}({\text{size}}\;{\text{of}}\;{\text{the}}\;{\text{dataset}})$$
(15)

AUC Area Under the Curve (AUC) can be measured by finding out a definite integral between the given two points in the graph.

The QoS (Quality of Service) based framework consisting of 15 sets of equations with parameters is informative; however, in this framework, only a few parameters are sufficient for the Analysis of Signal Processing Techniques for the BCI. Therefore, this framework is appropriate for the analysis of signal processing. Because it has much more computationally simple stochastic characteristics, e.g. mean, correlation, etc. Moreover, it has additional parameters accuracy, precision, sensitivity, and specificity which are most widely used. The QoS-based framework is useful for analyzing signal processing techniques for BCI systems. This framework appears to have 15 sets of equations with parameters, but only a few of these parameters are actually necessary for the analysis of signal processing techniques. This makes the framework computationally simpler and more efficient for this specific purpose. In addition to the standard stochastic characteristics like mean and correlation, this framework also includes parameters such as accuracy, precision, sensitivity, and specificity. These parameters are commonly used in signal processing and are particularly relevant for evaluating the performance of BCI systems. Overall, it seems that this QoS-based framework is a useful tool for analyzing signal processing techniques for BCI systems, particularly due to its computational simplicity and inclusion of relevant performance parameters.

5 Results and Discussion

The key objective of the system is to a comparative meta-analysis of EEG Signal-processing Methods to recognize the Mental State in Brain-Computer Interfaces (BCI) in different patients based on various attributes. Data used in the preparation of this work were obtained from the “Physio Net Website database” [18]. The benchmark data set with EEG are provided in European Data Format (EDF) format, which is converted into CSV files. Each subject has 2 files first is the recording of the background EEG of a subject (before the mental arithmetic task) and the second one is the recording of EEG during the mental arithmetic task. The suggested framework evaluates the QoS parameters to measure the performance of the EEG benchmark dataset given in Table 5.

Table 4 Comparative study of Different ML models

Table 5 shows a comparative analysis of three different ML models conducted. The techniques were evaluated on the basis of following metrics: Training Results (Validation): The accuracy of each model on the validation set during training. Test Results (Accuracy): The accuracy of each model on the test set. Total Cost: The total cost associated with training and using each model. Prediction Speed: The speed of each model in making predictions on new data, measured in observations per second. Training Time: The time it takes for each model to train on a given dataset. The three models compared were Kernel Naive Bayes, Gaussian Naive Bayes, and Linear SVM. Based on the results: Kernel Naive Bayes and Linear SVM had the same training results with an accuracy of 91.7%, while Gaussian Naive Bayes had a slightly lower accuracy of 88.9%. Kernel Naive Bayes had the highest test result accuracy at 97.2%, followed by Linear SVM at 97.2% and Gaussian Naive Bayes at 94.4%. Kernel Naive Bayes and Linear SVM had the same total cost at 3, while Gaussian Naive Bayes had a slightly higher total cost at 4. Kernel Naive Bayes had the fastest prediction speed at 3800 observations per second, followed by Linear SVM at 1900 observations per second and Gaussian Naive Bayes at 860 observations per second. Kernel Naive Bayes and Linear SVM had the training time at 1.0862 and 1.148 s, while Gaussian Naive Bayes had a slightly longer training time at 2.0935 s.

Further Table 3 provides both Kernel Naive Bayes and Linear SVM have the same accuracy of 91.7%. However, there are differences in their performance in terms of other metrics such as Sensitivity, Specificity, Precision, F1-Score, and False Negative Rate. Kernel Naive Bayes has a higher sensitivity (88.1%) compared to Linear SVM (85%), indicating that Kernel Naive Bayes performs better at identifying positive cases correctly. On the other hand, Linear SVM has a higher specificity (96.6146%) than Kernel Naive Bayes (94.075%), indicating that Linear SVM performs better at identifying negative cases correctly. The balanced accuracy of Kernel Naive Bayes (91.0875%) and Linear SVM (90.8073%) is similar, which takes into account both sensitivity and specificity. However, the precision of Kernel Naive Bayes (90.75%) is lower than that of Linear SVM (94.85%), indicating that Linear SVM is better at identifying true positives. The F1-Score, which is the harmonic mean of precision (P) and recall (R), is higher for Linear SVM (90.03%) than for Kernel Naive Bayes (89.405%). This means that Linear SVM has a better balance between precision and recall. The false negative rate (FNR) of Kernel Naive Bayes (11.9%) is higher than that of Linear SVM (15%), indicating that Linear SVM has a lower rate of incorrectly classifying positive cases as negative. Finally, the false positive rate (FPR) of Kernel Naive Bayes (5.924%) is lower than that of Linear SVM (3.385%), indicating that Kernel Naive Bayes has a lower rate of incorrectly classifying negative cases as positive. Overall, both Kernel Naive Bayes and Linear SVM have similar accuracies, but their performance varies in terms of other metrics, and the choice between them depends on the specific requirements and priorities of the application.

Table 5 Results of ML models having same accuracy

Based on Fig. 6 have provided, here is a bar chart that summarizes the results of your two models. In the chart, each metric is represented by a separate bar for each model. The length of the bar shows the value of the metric, with longer bars indicating higher values. The chart allows for easy comparison between the two models across all the metrics. The suggested QoS framework is useful for the Analysis of Signal Processing Techniques for the BCI. The proposed model for EEG is performing better than the state of art. Moreover, based on the results in the bar graph, it appears that the proposed model for EEG using either Kernel Naive Bayes or Linear SVM is performing better than a set of state-of-the-art models. This is demonstrated by the high accuracy scores of both models (91.7%). However, it is also important to consider other performance metrics beyond just accuracy. In this case, there are differences in the sensitivity, specificity, precision, F1-score, and false negative rate of the two models. Kernel Naive Bayes has a higher sensitivity (88.1%) than Linear SVM (85%), which suggests that it is better at identifying positive cases correctly. This may be important if the goal is to minimize false negatives (i.e., cases where the model fails to identify a positive example). On the other hand, Linear SVM has a higher specificity (96.6146%) than Kernel Naive Bayes (94.075%), which suggests that it is better at identifying negative cases correctly. This may be important if the goal is to minimize false positives (i.e., cases where the model incorrectly identifies a negative example as positive). The balanced accuracy of both models is similar, which suggests that they perform similarly well overall. However, depending on the specific goals of the analysis, one model may be more appropriate than the other based on its performance on individual metrics. Overall, the QoS framework appears to be a useful tool for analyzing signal processing techniques for BCI and evaluating the performance of different models.

Fig. 6
figure 6

Comparative results of kernel naive bayes and linear SVM model

6 Conclusion and Future Scope

BCI has strengthened physically challenged through the interaction outer world with the brain’s EEG. Several steps and the algorithms involved in signal processing of EEG signal have been studied in this work and problems associated with each of them worked till now also have been discussed here. In this proposed work all aspects from pre-processing to classification are studied thoroughly and tried to give appropriate solutions.

For studying the mental state, the processing of EEG signals is required. The main information essential to design an EEG-based BC interface is spectral, temporal, and spatial information. Feature extraction and classifications are other important parameters that are discussed in his work.

The key goal of the classification model is to minimize false positives (i.e., cases where the model incorrectly identifies a negative example as positive). Precision and F1-score are also important metrics to consider, as they consider both true positives and false positives. Overall, the proposed model for EEG using either Kernel Naive Bayes or Linear SVM appears to be performing better than the state of the art in terms of accuracy and other parameters to evaluate the effectiveness of the model.

Moreover, it is important to thoroughly assess the performance of the proposed model for EEG against the state of the art using a variety of performance metrics, not just accuracy. If the proposed model is shown to consistently outperform the state of the art across multiple metrics and datasets, it may be considered an improvement in the field of EEG analysis. However, it is important to note that the field of EEG analysis is constantly evolving, and new state-of-the-art models may be developed over time that could outperform the proposed model. Therefore, it is important to continue to evaluate and refine the proposed model as compared to new and existing models as the field progresses.