EEG Based Cigarette Addiction Detection with Deep Learning

EEG Based Cigarette Addiction Detection with Deep Learning

Talip Çay* Emre Ölmez Nermin Tanık Cemil Altın

Electrical and Electronics Engineering, Yozgat Bozok University, Yozgat 66200, Turkey

Biomedical Engineering, İzmir Bakırçay University, İzmir 35665, Turkey

Neurology Department, Yozgat Bozok University, Yozgat 66200, Turkey

Corresponding Author Email: 
talip.cay@yobu.edu.tr
Page: 
1183-1192
|
DOI: 
https://doi.org/10.18280/ts.410308
Received: 
4 September 2023
|
Revised: 
12 March 2024
|
Accepted: 
25 April 2024
|
Available online: 
26 June 2024
| Citation

© 2024 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

In this study, cigarette addiction detection was performed using machine learning techniques with time-frequency feature extraction methods on EEG data collected from 30 different male individuals. Electroencephalography (EEG) data collected from individuals who underwent the Fagerström Test for Nicotine Dependence (FTND) were labeled as dependent or non-dependent based on their test results. The obtained EEG data were first subjected to Discrete Wavelet Transform (DWT). Then, Power Spectral Density (PSD) analysis and feature extraction processes were performed separately on the outputs obtained from the DWT process. The data obtained from PSD analysis and feature extraction processes were classified using Artificial Neural Networks (ANN). The aim of this study is to achieve higher success rates in cigarette addiction detection by classifying EEG data with machine learning methods after extracting time-frequency features, rather than using traditional methods. In this study, responses to cigarette stimuli were classified using machine learning methods based on EEG graphs. The results revealed that temporal and prefrontal lobes were more distinctive in responses to cigarette stimuli, and success rates were higher in the theta frequency band.

Keywords: 

discrete wavelet transform, power spectral density, nicotine dependence, EEG, deep learning, artificial neural networks

1. Introduction

The human brain is one of the most important organs in the body that controls physical movements, organ functions, and emotions. It contains approximately one hundred billion interconnected neurons, which are nerve cells. The brainwaves produced in the human brain can be analysed using a technique called EEG (Electroencephalogram). Neurons in the brain involve ionic currents that cause voltage fluctuations. These fluctuations are recorded with multiple head electrodes to generate an EEG signal [1]. Since every individual's behaviour or emotional state is unique, each person will have a unique EEG brain wave signal [2-4]. EEG signals are analysed as time and frequency series in data analysis.

Since the discovery of the presence of electric currents in the brains of rabbits and monkeys by the British doctor Richard Caton in 1875, significant progress has been made in the field of EEG. Today, EEG is used in various fields ranging from the diagnosis of neurological disorders, the investigation of brain activity, the detection of sleep disorders, to anaesthesia management.

In this study, 107 EEG data obtained from 30 different male subjects who underwent the Fagerström Test for Nicotine Dependence (FTND) were preprocessed by two different methods and classified using an Artificial Neural Network (ANN). EEG data were collected from the subjects using visual stimuli through 19 channels at a sampling frequency of 4096, and labeled into two classes according to the results of the FTND (smokers and non-smokers).

The workflow diagram of the study is shown in Figure 1. Firstly, the obtained EEG data were decomposed into four different frequency bands (0-4 Hz, 4-8 Hz, 8-16 Hz, 16-32 Hz) using Discrete Wavelet Transform (DWT). Subsequently, Spectral Power Density (PSD) analysis and feature extraction operations were separately applied to each wave in the obtained frequency bands. After normalization of the results from PSD and feature extraction operations, the EEG data from each of the 19 channels were classified separately using an ANN classifier, and success rates were analyzed. The primary aim of this study is to classify EEG data using machine learning methods for the detection of smoking addiction, contrary to traditional addiction level determination methods, in order to achieve higher success rates.

This study presents a non-traditional method for detecting smoking addiction using EEG data. Furthermore, its potential scientific contributions in future studies could be as follows:

Traditionally, the detection of smoking addiction is often performed using clinical scales and surveys. However, our study proposes a more objective diagnostic method by utilizing the time-frequency features of EEG data. This could make the diagnostic process more objective and provide a new perspective for clinical applications.

The utilization of EEG data may aid in better understanding the neurological basis of smoking addiction. This, in turn, enables the development of new treatment methods and improvements in existing treatment protocols. Understanding the responses of specific brain regions to smoking cues can contribute to personalized treatment strategies and enhance effectiveness.

It provides an example of processing and classifying EEG data using machine learning techniques. This could lead to the development of new methods that can be utilized in the diagnosis and treatment of other neurological disorders in the future.

It may contribute to the field of brain-computer interfaces (BCI) by utilizing EEG data. The techniques used for detecting smoking addiction could inspire the development of other BCI applications, fostering further research and development in areas such as controlling brain activity or communication.

Additionally, the study could contribute to the enhancement of studies conducted for smoking cessation treatments and other addiction research based on the obtained results.

Figure 1. The main flow of the study

2. Methods and Dataset Description

2.1 Related work and motivation

There are many studies in the literature on EEG data analysis. When we conducted a literature review based on smoking addiction and machine learning, the following studies were listed:

Setiawan [5] conducted a study where a FTND (Fagerström Test for Nicotine Dependence) questionnaire was administered to 25 individuals, and the questionnaire results were correlated with EEG data obtained from the participants. The EEG data was divided into different frequency bands (delta, alpha, beta, theta) using Discrete Wavelet Transform (DWT), and classification was performed using LVQ (Learning Vector Quantization) artificial neural networks. The study observed a higher increase in frontal lobe brain activity in individuals with high levels of smoking addiction.

Hasan et al. [6] performed smoking addiction detection using EEG data. The EEG data was divided into time, frequency, and time-frequency domains, and three separate neural networks were created. The study achieved an accuracy of 90-95% in distinguishing between smokers and non-smokers using an Artificial Neural Network (ANN) based on the time-frequency domain.

Hanafiah et al. [7] administered the FTND questionnaire to 33 individuals with smoking addiction and correlated the questionnaire results with EEG data. Power Spectral Density (PSD) was used for brain wave analysis. The study observed that moderately addicted smokers had higher power in the Theta Band, Alpha Band, and Beta Band compared to low-level smokers.

Hanafiah et al. [8] recorded 3-minute EEG data from 8 smokers and 8 non-smokers. The acquired EEG data was decomposed into different frequency waves using DWT. The Theta, Delta, Beta, and Alpha frequency bands were investigated, and differences in the Alpha and Beta frequency bands were found in smokers.

Su et al. [9] analysed EEG data recorded during resting state from individuals under 21 years of age with smoking addiction and non-addicted individuals. They used PSD and a specialized visualization interface for analysis. The study observed increased Alpha band signals in the left-frontal, right-frontal, and midline-frontal regions in individuals with smoking addiction, as well as decreased Delta band signals in the right-posterior, midline-frontal, and midline-posterior regions.

Chin et al. [10] performed classification on EEG data from 10 smokers and 10 non-smokers. They used Support Vector Machine (SVM) as the classifier and PSD and Fast Fourier Transform (FFT) for EEG analysis. The study achieved a success rate of 97.50% and observed that FFT performed better.

Hasan et al. [11] performed EEG-based smoking addiction detection using classical machine learning algorithms. They used Logistic Regression (LR), K-Nearest Neighbor (KNN), SVM, and Random Forest Classifier (RFC) for classification. The study obtained success rates of 86.5% in SVM, 87.2% in LR, 87.5% in KNN, and 91.3% in RFC.

Hanafiah et al. [12] analysed EEG data from 33 individuals with smoking addiction and 33 non-smokers by dividing the data into lower frequency bands using DWT and analyzing them using PSD. The study observed that smokers had higher frequencies in the alpha and theta bands.

Pesen et al. [13] use is a widespread behaviour worldwide with high addiction potential. Approximately 1.5 billion people use tobacco and tobacco products, with tobacco use being more prevalent in countries such as China, India, and Indonesia. Turkey is among the top 10 countries in the world with the highest tobacco use, with approximately 17 million people (31.2%) using tobacco.

Smoking addiction is a serious health problem worldwide, negatively impacting the quality of life for many individuals. While posing significant threats to individuals' physical and psychological health, smoking addiction also results in societal harm both in terms of health and economics. Therefore, developing accurate and effective methods for detecting smoking addiction is crucial.

The time-frequency features of EEG data are commonly utilized to comprehend human brain activities. Studies concerning smoking addiction have also been conducted on EEG data. While most of these studies concentrate solely on the frequency features of EEG data, there are fewer studies on time-frequency features [14, 15]. In this study, a novel approach was established by conducting classification using a designed ANN after extracting the time-frequency features of EEG data. When examining the literature, it is observed that previous studies primarily performed classification and analysis processes using feature extraction methods or classical machine learning algorithms with raw EEG data. In this study, time-frequency representations of raw EEG data were acquired using methods such as DWT. Subsequently, the data were processed using PSD analysis and feature extraction methods. Then, a 19-layer designed ANN was employed to conduct effective classification by correlating it with FTND results. This methodology offers a distinct approach from prior studies.

2.2 EEG signal acquisition

In this study, participants were asked to complete the FTND before their EEG data were collected. FTND is an internationally accepted questionnaire consisting of six questions. It was developed by Heatherton and colleagues in 1991 [16]. Pomerleau and colleagues stated that FTND is reliable in determining nicotine addiction level with its six items [17]. The European Union of Medical Specialists in Smoking Cessation (EMASH) stated in their smoking cessation guide for healthcare professionals that FTND is sufficient in showing nicotine addiction level [18]. The Turkish reliability and factor analysis of FTND were conducted by Uysal and colleagues [19].

During the process of collecting EEG data, particularly in sensitive applications such as analyzing brain waves, various unwanted artifacts can be encountered, significantly impacting the quality of the signal. These artifacts may stem from factors beyond human control, such as muscle movements, eye blinks, or electrical devices, and can adversely affect the accuracy of research findings. Therefore, it is critical to apply specific preprocessing steps to raw data obtained from EEG devices to make them suitable for analysis. The preprocessing steps employed in this study aim to be compatible with standard methods in signal processing, enhancing data quality to achieve more reliable results.

Firstly, high-pass filters that block frequencies below 300 mHz were used. This filtering process is particularly important for reducing the impact of low-frequency artifacts (e.g., slow-motion artifacts) on EEG signals. High-pass filters help filter out unwanted low-frequency noise while preserving the biologically interesting portion of the EEG signals.

Simultaneously, low-pass filters that cut off frequencies above 70 Hz were applied. This process aids in removing noise that is present at high frequencies, which often originates from electronic devices or electromagnetic interference, while preserving the frequency range that is biologically significant for EEG signals and reducing unwanted high-frequency artifacts.

In addition, a notch filter targeting noise from the main power supply, such as 50 Hz or 60 Hz, has been applied. The notch filter effectively reduces noise at these specific frequencies, minimizing the impact of artifacts related to the main power supply on EEG signals.

Regarding visual stimuli, researchers presented participants with images of various random objects encountered in daily life, as well as cigarette images. The cigarette images, intentionally interspersed among the others, aim to trigger a specific response related to cigarettes. This method has been used to measure the natural responses of participants to cigarette images and analyze the impact of these responses on EEG signals. Presenting all images to participants in the same order and manner standardizes the study, enhancing the reliability of the results. This detailed preprocessing and experimental setup support the effort to identify objective biomarkers of nicotine addiction by maximizing the accuracy and repeatability of the information obtained from EEG data.

When the EEG data acquisition device starts the recording process, the visual stimuli shown in Figure 2 are initiated as a presentation. Here, the sequence of presenting these visuals follows the procedure outlined in Figure 3.

Figure 2. Visual stimulation presentation

Figure 3. Signal acquisition setup

The electrode gel used is designed for the EEG cap and provides conductivity for impedance adjustment. These features provided by the EEG measurement system can be modified using the interface (System Plus Evaluation) produced by Micromed.

As shown in Figure 4, there are separate slots for each electrode belonging to the international 10/20 measurement system and a separate socket slot for cap connection. The 10/20 system is the accepted standard for electrode placement in EEG applications and has been used for half a century. This system defines the locations on the scalp using the relative distances between the cranial landmarks on the scalp [20].

Figure 5 shows the EEG device and sample EEG data acquisition process. The device used for data acquisition has 32 channels and a preamplifier gain of 1600 µV/cm. The cut-off frequency (fc) can be adjusted between 0.008-2000 Hz, and a notch filter (50 Hz) setting is available to suppress power line noise. The system has a maximum sampling frequency of 4096 Hz and 16-bit resolution ADC structure. In addition, the system offers bipolar and unipolar measurement modes for EEG channels.

Figure 4. 10/20 Measurement system electrode arrangement and brain regions [21, 22]

Figure 5. EEG recording system

The following precautions were taken before data acquisition:

1-Individuals who are smokers were asked not to smoke at least 2 hours before data acquisition.

2-Attention was paid to the cleanliness of the individuals' hair.

3-All devices that could cause artefacts (e.g. phones) were turned off in the room where data acquisition was performed.

4-Data acquisition was performed with a laptop computer to reduce city grid artefacts.

5-Individuals were asked not to eat or take medication/caffeine at least 2 hours before data acquisition.

The following precautions were taken during data acquisition:

1-Care was taken to ensure that individuals did not move.

2-Attention was paid to the use of conductive gel for the electrodes. (Gel from one electrode did not touch another electrode.)

3-The EEG cap and electrode cleaning were performed for each individual after the EEG procedure.

4-The electrode fixation process was carefully performed and EEG acquisition was performed after the electrode impedance values fell below 10 ohms.

5-If unusual changes were observed in the signals during EEG acquisition, the procedure was stopped.

6-The data acquisition hours were the same for all individuals (14:30-16:30).

The EEG data recorded in this study has a sampling frequency of 4096 Hz. EEG data was collected from 13 addicted and 17 non-addicted individuals, resulting in 118 seconds of EEG data per individual by showing each of the 59 slides in Figure 2 for 2 seconds each. Two-second segments of the individuals' EEG signals at the time when smoking images were presented were extracted from the signal and labelled as addicted or non-addicted according to the individual's FTND test result.

In the process of training and evaluating the model, the dataset has been evenly split into a training set comprising 70% of the data and a test set comprising the remaining 30%. This balanced distribution has facilitated the adoption of a comprehensive approach during the model's training and testing phases, thereby enhancing the representational capacity of the dataset used in the learning process. The results obtained on the test set reflect the final performance of the model and unveil its potential success on real-world data. These results are considered a critical indicator of the model's generalizability and its potential performance on external datasets. Additionally, the study has taken into account the participants' age, height-weight, and physiological characteristics, which are presented in Table 1.

Table 1. Individual characteristics

SN

Age

Height (cm)

Weight (kg)

Gender

Status

1

28

172

85

M

Smoker

2

27

174

80

M

Smoker

3

29

178

74

M

Non-Smoker

4

35

176

76

M

Smoker

5

38

177

80

M

Smoker

6

41

182

70

M

Smoker

7

33

174

72

M

Non-Smoker

8

22

170

62

M

Non-Smoker

9

34

171

82

M

Smoker

10

23

180

110

M

Non-Smoker

11

39

181

93

M

Non-Smoker

12

23

193

105

M

Smoker

13

28

187

130

M

Smoker

14

25

182

76

M

Smoker

15

23

170

70

M

Non-Smoker

16

34

173

120

M

Non-Smoker

17

44

179

91

M

Non-Smoker

18

22

178

78

M

Non-Smoker

19

45

175

65

M

Smoker

20

40

176

83

M

Non-Smoker

21

23

185

76

M

Smoker

22

25

180

79

M

Smoker

23

45

179

71

M

Non-Smoker

24

32

177

80

M

Smoker

25

39

176

84

M

Smoker

26

42

175

86

M

Smoker

27

37

187

81

M

Smoker

28

40

172

83

M

Smoker

29

34

179

79

M

Non-Smoker

30

27

182

70

M

Non-Smoker

2.3 Discrete Wavelet Transform (DWT)

WT (Wavelet Transform) is a technique used to analyse a signal in the time-frequency domain. In this method, the signal is decomposed into different frequency components using a scaling function and a specific wavelet function [23]. DWT (Discrete Wavelet Transform) works on the same principle, but breaks down the signal into smaller parts and processes each part separately. DWT is a mathematical operation used to determine the frequency components of a signal. This process separates the high and low frequency components of a signal by breaking it down into smaller scales, and represents these components at different scales and times. DWT is widely used in fields such as image processing, signal processing, and data compression. This operation plays an important role in data compression because a large portion of the high-frequency components can be removed, reducing the signal size significantly. Additionally, DWT can be used in situations where data needs to be analysed at different scales [24]. DWT has been proven effective in the analysis of bio signals [25].

The mathematical formulation of the discrete wavelet transform is as follows:

${{C}_{j,k}}=\sum\limits_{n=0}^{N-1}{f(n).{{\phi }_{j.k}}(n)}$                   (1)

${{D}_{j,k}}=\sum\limits_{n=0}^{N-1}{f(n).{{\psi }_{j.k}}(n)}$                  (2)

where, f(n) is the n-th sample of the signal to be analysed, N is the number of sampling points of the signal. $\phi_{j, k}(n)$ and $\psi_{j, k}(n)$ are the j-th scale and k-th time shift of the scaling and wavelet functions, respectively. $C_{j, k}$ and $D_{j, k}$ are the outputs of the discrete wavelet transform for the scaling and wavelet components of the signal, respectively [26].

2.4 Feature extraction

Signal processing is a set of techniques used for the analysis and manipulation of time-varying or spatial data. Biomedical signals, such as electroencephalography (EEG), contain complex data on the electrical activity of the human body. In signal processing, feature extraction is the process of obtaining meaningful information from raw data and is usually a preliminary step for data analysis, recognition, or classification processes. Feature extraction involves determining and extracting metrics that represent the signals and are more useful for analysis, rather than directly processing the raw signals.

The 15 features mentioned in this study are widely accepted in signal processing, especially in the analysis of EEG data. These features include basic statistical properties of signals (mean, standard deviation, skewness, kurtosis, etc.), energy features (autocorrelation coefficients, Wilson amplitude), and time-domain features (number of zero crossings, sign changes in slope). Extracting such features simplifies the complex structure of EEG data, making the data more understandable and can highlight differences between brain states. Specifically, the ability to distinguish between specific brain states, such as addiction states, is a crucial factor in the selection of these features.

Feature extraction directly impacts the performance of classification and recognition systems. Well-chosen features can enhance the accuracy and reliability of the model, while less informative or misleading features can decrease the model's performance. Therefore, significant attention has been given to the feature selection stage in this study, including a testing phase to identify and remove features that decrease the overall performance of the model. This process ensures that only the most informative and meaningful features are included in the analysis, enabling more effective and accurate classification and recognition operations on EEG data.

The feature set used in the study is provided below along with their descriptions:

Mean: This feature is obtained by summing the amplitudes of the signal samples and dividing them by the number of samples. In statistics, this feature is called the first-order moment. The mean provides a general overview of the signal and allows us to obtain information about the behaviour of the signal. Therefore, the mean feature has an important place in signal processing and analysis.

$mean=\frac{1}{N}\sum\limits_{n=1}^{N}{{{x}_{n}}}$                     (3)

Mean absolute deviation (MAD): Mean Absolute Deviation is the sum of the absolute values of the distances of sample data points from the mean [27].

$mad=\frac{1}{N}\sum\limits_{n=1}^{N}{\left| {{x}_{n}}-mean \right|}$                  (4)

Variance: This value gives the distribution of the data around the mean value. It is calculated by taking the arithmetic mean of the squares of the distance of each value in the data set from the mean value, and expressed as follows:

$variance=\frac{1}{N-1}\sum\limits_{n=1}^{N}{{{({{x}_{n}}-mean)}^{2}}}$                      (5)

Standard deviation: Standard deviation is used to determine how close the samples in a dataset are to the mean and to measure how spread out the data is. Standard deviation is the square root of variance.

$sd=\sqrt{\frac{1}{N-1}\sum\limits_{n=1}^{N}{{{({{x}_{n}}-mean)}^{2}}}}$                        (6)

Skewness: It shows how much the distribution deviates from symmetry around the mean and is expressed as follows:

$skewness=\frac{\frac{1}{N}\sum\nolimits_{n=1}^{N}{{{({{x}_{n}}-mean)}^{3}}}}{s{{d}^{3}}}$                 (7)

Kurtosis: This provides information about whether the peak values of the data are flat or sharp.

$kurtosis=\frac{\frac{1}{N}\sum\nolimits_{n=1}^{N}{{{({{x}_{n}}-mean)}^{4}}}}{s{{d}^{4}}}$                      (8)

Autocorrelation coefficients: Autocorrelation coefficients are one of the commonly used methods in signal processing. Mathematically, it can be expressed as follows:

$x\left[ n \right]=-\sum\limits_{k=1}^{p}{{{a}_{k}}x\left[ n-k \right]+e\left[ n \right]}$                (9)

where, p is the degree of the model, Xn is the data signal consisting of n samples, ak are the real-valued autocorrelation coefficients, and e[n] represents the error term of independent white noise from the previous samples. The aim here is to investigate the relationship of a data point with the previous few points and to create a model based on this.

Zero crossing rate: In this method, the points where the signal is 0 are counted and recorded.

$z c c=\sum_{N=1}^{N-1}\left[\operatorname{sgn}\left(x_n \cdot x_{n+1}\right] \cap\left|x_n-x_{n+1}\right| \geq\right.$ threshold                 (10)

Wilson amplitude: It is a value that indicates how many times the consecutive samples in the signal exceed a predetermined threshold value and is expressed as follows:

$\begin{aligned} & w a=\sum_{n=1}^{N-1}\left[\operatorname{sgn}\left(\left|X_n-X_{n+1}\right|\right)\right] \\ & f(x)=1 \Rightarrow f(x) \geq \text { threshold } \\ & f(x)=0 \Rightarrow \text { other_situations }\end{aligned}$                (11)

Slope sign change: The points where the slope of the signal changes from positive to negative and negative to positive are counted and recorded.

$\begin{matrix}  ssc=\sum\limits_{n=2}^{N-1}{\left[ f\left[ ({{x}_{n}}-{{x}_{n-1}})x({{x}_{n}}-{{x}_{n+1}}) \right] \right]}; \\  f(x)=1\Rightarrow f(x)>threshold \\  f(x)=0\Rightarrow other\_situations \\\end{matrix}$                      (12)

Singular value decomposition (SVD): SVD is a process of decomposing a matrix. It is achieved by calculating the eigenvalues and eigenvectors of the given matrix. SVD can compress the information contained in the matrix and emphasize its important features without changing the dimension of the matrix. Therefore, SVD is widely used in fields such as data analysis, dimensionality reduction, matrix approximation, and recommendation systems [28].

$M=U.d..{{V}^{T}}$                  (13)

where, M is an m x n sized matrix, U is an m x m sized orthogonal matrix, d is an m×n sized diagonal matrix, and the elements of d are the nonzero singular values. VT is an n×n sized transposed orthogonal matrix.

Median: The value that falls in the middle when the samples in a dataset are arranged in order.

If there is an odd number of samples in the dataset;

$median=x\left[ \frac{(n+1)}{2} \right]$                          (14)

If there is an even number of samples in the dataset;

$median=\frac{\left( x\left[ \frac{n}{2} \right]+x\left[ \left( \frac{n}{2}+1 \right) \right] \right)}{2}$                     (15)

Minimum and maximum values: The smallest and largest values of the samples in a dataset.

$min=\left[ {{x}_{1}},{{x}_{2}},...,{{x}_{n}} \right]$                  (16)

$min=\left[ {{x}_{1}},{{x}_{2}},...,{{x}_{n}} \right]$                   (17)

Sum: The sum of the samples in a dataset.

$sum=\sum\limits_{i=1}^{n}{{{x}_{i}}}$                     (18)

2.5 Power Spectral Density (PSD)

PSD represents the power distribution of the frequency components of a signal. In other words, it measures the power levels of different frequency components of a signal. It can be used to analyse the characteristics of signals in the frequency domain. This method can be applied to EEG signals over a wide frequency range, as well as signals in defined sub-bands [29, 30].

The periodogram is a classical spectral estimation method and is calculated using the non-parametric FFT (Fast Fourier Transform) method. The Welch method, on the other hand, is a more advanced method and processes the signal by dividing it into overlapping windows. One of the PSD methods that increases signal power at different frequencies is the Welch method [31]. The Welch method has been shown to present very strong features of EEG signals and provide good discrimination between classes [32]. Welch PSD divides the data into overlapping segments, calculates their windows and FFTs, squares the resulting values, and finally takes the time average of the resulting periodograms. The advantages of the Welch method include reducing noise and power variances [33].

$P(f)=\frac{{{T}_{s}}}{K.M}{{\left| \sum\limits_{n=0}^{M-1}{x(n)w(n)}.{{e}^{-j2\pi fn}} \right|}^{2}}$                    (19)

The power spectrum of the signal sampled with Ts is equalized to the power spectrum of the continuous-time signal using the windowing function w(n). During this process, a normalization constant called K is used.

In Eq. (20), $S_{x x}^{\wedge(i)}(f)$ represents the i-th windowed periodogram. In Eq. (21), L is the number of windows. Taking periodograms in small parts instead of the entire signal and averaging them provides more accurate results.

$S_{xx}^{\hat{\ }(i)}(f)=\frac{{{T}_{s}}}{K.M}{{\left| \sum\limits_{n=0}^{M-1}{x(n)w(n)}.{{e}^{-j2\pi fn}} \right|}^{2}}$                  (20)

$P_{welch}^{\hat{\ }}(f)=\frac{1}{L}\sum\limits_{i=0}^{L-1}{S_{xx}^{\hat{\ }(i)}(f)}$                 (21)

2.6 Evaluation metrics

In scientific studies, evaluation metrics are necessary to monitor the performance of proposed systems. In classification problems, evaluation metrics can be easily calculated using a confusion matrix, as shown in Table 2. Cases where the outputs generated by the algorithm are correct are written as true positive (TP) cells and true negative (TN) cells in the confusion matrix. If an output is generated as negative but is actually positive, it is written in the false negative (FN) cell, and if an output is generated as positive but is actually negative, it is written in the false positive (FP) cell.

Table 2. The confusion matrix

 

Target Class

0

1

Output Class

0

True Negative (TN)

False Negative (FN)

1

False Positive (FP)

True Positive (TP)

Classification accuracy (ACC) is a commonly used quality measure to evaluate the performance of classification algorithms, and is calculated by dividing the number of correct predictions by the total number of predictions. In addition to ACC, which is the most basic measure, other commonly used measures include specificity (SPEC), sensitivity (SENS), precision (PREC), and F-score.

SPEC measures the rate of correctly predicting true negatives by the classifier, while SENS measures the rate of correctly predicting true positives. PREC is the ratio of the total number of true positive examples that are correctly classified to the total number of positive examples. The F-score is the harmonic mean of precision and recall values. These measures are calculated according to the following formulas:

$accuracy=\frac{tp+tn}{tp+tn+fp+fn}$                   (22)

$specificity=\frac{tn}{tn+fp}$                (23)

$sensitivity=\frac{tp}{tp+fn}$           (24)

$precision=\frac{tp}{tp+fp}$                (25)

$f-score=2\times \frac{\left( precision \right)\times \left( sensitivity \right)}{\left( precision \right)+\left( sensitivity \right)}$                    (26)

2.7 Artificial Neural Network (ANN)

Deep ANN is a subfield of artificial intelligence that enables algorithms to match learned models with data, similar to traditional machine learning algorithms. However, deep ANN works with more complex structures and larger datasets. Deep ANN uses a multi-layer architecture where data is passed through different layers to learn features and produces classification, prediction, or another output in the final layer. These features help the model understand the data and distinguish different features from each other.

In the 1950s, Frank Rosenblatt developed the simplest ANN model called Perceptron, inspired by the work of Warren McCulloch and Walter Pitts. Perceptron performed well on simple tasks, but failed to solve complex problems. In the early 1990s, advances in machine learning led to further development of ANN. During this time, new learning techniques like backpropagation algorithm were developed, allowing ANN to perform more complex tasks. In the early 2000s, the use of deep ANN with multiple hidden layers increased significantly. Today, deep ANN is considered one of the most important tools in machine learning and is used in many fields in the healthcare sector, ranging from disease diagnosis to medical image interpretation [34].

Table 3. Deep ANN layers

Sequence Input Layer

Fully Connected Layer (32)

ReLU Layer

Fully Connected Layer (64)

ReLU Layer

Fully Connected Layer (64)

ReLU Layer

Fully Connected Layer (128)

ReLU Layer

Dropout Layer

Fully Connected Layer (128)

ReLU Layer

Dropout Layer

Fully Connected Layer (256)

ReLU Layer

Dropout Layer

Fully Connected Layer (2)

Softmax Layer

Classification Output Layer

In this study, the deep ANN model used consists of 19 layers as shown in Table 3. ReLU function is used as the activation function in the model. Model training was performed using the ADAM optimization algorithm in 1000 epochs. During model training, the dataset was divided into two separate sets, 70% for training and 30% for testing.

3. Results

The classification of the EEG data obtained in this study was performed with two separate methods, as shown in Figure 1. Firstly, the transformation results obtained with DWT were classified with deep ANN classifier after PSD application. As an alternative method, after DWT, feature extraction was performed and classification was performed with deep ANN classifier, and the results were recorded. These procedures were performed separately for all EEG signals obtained from 19 different channels. Table 4 shows the classification accuracy, specificity, sensitivity, precision, and F-Score metrics for theta frequency obtained with DWT after PSD application. These measurements were performed for each EEG channel, and the average success of metric measurements for each channel is given in the last column of the table.

Table 4. Classification results obtained with PSD on theta band

Channel

Accuracy

Specificity

Sensitivity

Precision

F_Score

Avg.

Fp2

0.9788

0.9630

0.9388

0.9455

0.9425

0.9537

Fp1

0.9770

0.9691

0.9690

0.9691

0.9744

0.9717

F8

0.9765

0.9630

0.9474

0.8955

0.9236

0.9412

F4

0.9590

0.9568

0.9902

0.9758

0.9966

0.9757

Fz

0.9743

0.9753

0.9717

0.9516

0.9678

0.9681

F3

0.9572

0.9383

0.9231

0.9327

0.9378

0.9378

F7

0.9661

0.9506

0.9895

0.9376

0.9670

0.9622

T4

0.9586

0.9444

0.9827

0.9617

0.9778

0.9650

C4

0.9550

0.9259

0.9588

0.9508

0.9599

0.9501

Cz

0.9642

0.9444

0.9231

0.9052

0.9178

0.9309

C3

0.9396

0.8951

0.9604

0.9392

0.9509

0.9370

T3

0.9725

0.9815

0.9879

0.9798

0.9801

0.9804

T6

0.9926

0.9938

0.9896

0.9966

0.9902

0.9926

P4

0.9639

0.9691

0.9938

0.8937

0.9173

0.9476

Pz

0.9725

0.9568

0.9749

0.9550

0.9542

0.9627

P3

0.9780

0.9568

0.9266

0.9505

0.9674

0.9559

T5

0.9485

0.9630

0.9907

0.9550

0.9744

0.9663

O2

0.9678

0.9136

0.9835

0.9192

0.9236

0.9415

O1

0.9666

0.9215

0.9592

0.9571

0.9693

0.9547

Table 5. Summary results

   

Channel

Accuracy

Specificity

Sensitivity

Precision

F_Score

Avg.

PSD

Delta 0-4 Hz

T6

0.9802

0.9610

0.9787

0.9656

0.9887

0.9748

Theta 4-8 Hz

T6

0.9926

0.9938

0.9896

0.9966

0.9902

0.9926

Alpha 8-16 Hz

Fp2

0.9406

0.9496

0.9868

0.9797

0.9793

0.9672

Beta 16-32 Hz

Fz

0.9501

0.9005

0.9707

0.9513

0.9656

0.9476

Feature extraction

Delta 0-4 Hz

O1

0.8403

0.7682

0.9531

0.8870

0.9178

0.8733

Theta 4-8 Hz

T3

0.8523

0.7687

0.9571

0.8963

0.9314

0.8812

Alpha 8-16 Hz

P4

0.8413

0.7702

0.9541

0.8880

0.9188

0.8745

Beta 16-32 Hz

Fp1

0.8784

0.7982

0.8616

0.8563

0.8657

0.8520

The channels with the highest average classification success based on the results obtained from PSD and feature extraction for each frequency band are listed in Table 5. According to the average of metric measurement results, the highest classification success was achieved in channel T6 with a score of 0.9926 by applying PSD in the theta band.

4. Conclusion

Cigarette addiction is recognized as a significant health issue worldwide. Cigarette use contains many harmful substances that can cause numerous deadly diseases. These diseases include lung cancer, heart diseases, chronic obstructive pulmonary disease (COPD), stroke, and various other health problems. Cigarette addiction not only causes individual health issues but can also lead to many problems within society. For example, issues such as loss of workforce productivity, increased healthcare expenditures, and environmental pollution can arise due to cigarette use. Therefore, identifying and treating individuals with cigarette addiction is of utmost importance.

The key factors that determine the quality and reliability of research are generalizability and repeatability. Testing a model on a range of participants with different ages and physical characteristics increases the generalizability of the results. Additionally, testing the model on independent data sets is an important way to verify whether the findings are valid under different conditions. In our EEG-based cigarette addiction classification study, the generalizability of our model was ensured by using data from 107 samples collected from 30 different male individuals aged between 18 and 45. Our dataset helps ensure consistency of results across different demographic groups and also helps us better understand how effective the model is in real-world applications. Clearly stating methodological details supports the repeatability of the study and enables other researchers to achieve similar results using the same methods. This approach enhances the reliability of the scientific community while providing a solid foundation for future research.

The aim of this study is to detect individuals with cigarette addiction using EEG data through a machine learning method. In the study, EEG data have been classified as addicted or not based on the FTND results. 70% of the classified data was used for the training of the ANN (Artificial Neural Network) model, while the remaining 30% was used to test the model's success.

Before being fed into the ANN classifier, the EEG data, divided into waves at 4 different frequencies (alpha, beta, delta, theta) using the DWT method, underwent PSD and feature extraction processes separately. The results obtained from PSD and feature extraction were observed to have reasonable success rates when classified with ANN.

In the classification with ANN, the highest success rates in both preprocessing conditions were obtained in the theta band, while the lowest success rates were found in the beta band. When examining the success rates of classification for EEG data analyzed with PSD, it was observed that the success rates of the temporal and anterior frontal brain lobes were higher than those of other brain lobes. Similarly, when examining the success rates of classification obtained through feature extraction, it was observed that the temporal, left occipital, and anterior frontal lobes had higher success rates than other brain lobes. In both the classification with feature extraction and the classification with PSD analysis, similar brain lobes and EEG frequency bands were observed to stand out more distinctly.

In many studies in the literature, classical machine learning algorithms, PSD analysis, and various pre-processing techniques have been used together. Additionally, in many studies, time or frequency domain analyses have been performed separately [7, 9, 10]. The main difference of this study is the combined use of machine learning methods with time-frequency analysis [6]. The scientific contribution of this study is to demonstrate that temporal and prefrontal lobes are more active compared to other lobes and that the EEG theta frequency band is higher than other frequency bands.

The results obtained demonstrate that artificial neural networks (ANNs) can be used in conjunction with EEG data to achieve successful results in detecting smoking addiction. The results are encouraging for further studies on the use of ANN and EEG data for the detection of smoking addiction. This study, which was conducted using EEG data, offers an innovative approach as an alternative to traditional methods for detecting smoking addiction. According to the results obtained in the study, the identification of EEG frequency bands and active brain lobes with high success rates in smoking addiction will serve as a reference for future studies on smoking addiction.

  References

[1] Hosseini, M.P., Hosseini, A., Ahi, K. (2020). A review on machine learning for EEG signal processing in bioengineering. IEEE Reviews in Biomedical Engineering, 14: 204-218. https://doi.org/10.1109/RBME.2020.2969915

[2] Rangaswamy, M., Porjesz, B., Chorlian, D.B., et al. (2002). Beta power in the EEG of alcoholics. Biological Psychiatry, 52(8): 831-842. https://doi.org/10.1016/S0006-3223(02)01362-8

[3] King, D.E., Herning, R.I., Gorelick, D.A., Cadet, J.L. (2000). Gender differences in the EEG of abstinent cocaine abusers. Neuropsychobiology, 42(2): 93-98. https://doi.org/10.1159/000026678

[4] Costa, L., Bauer, L. (1997). Quantitative electroencephalographic differences associated with alcohol, cocaine, heroin and dual-substance dependence. Drug and Alcohol Dependence, 46(1-2): 87-93. https://doi.org/10.1016/S0376-8716(97)00058-6

[5] Setiawan, H. (2018). Measurement of brain activity rate based on electroensefalographical signals on smokers. Jurnal Inotera, 3(1): 15-22. https://doi.org/10.31572/inotera.Vol3.Iss1.2018.ID40

[6] Hasan, M.M., Hasan, N., Rahman, A., Rahman, M.M. (2019). Effect of smoking in EEG pattern and time-frequency domain analysis for smoker and non-smoker. In 2019 International Conference on Computer, Communication, Chemical, Materials and Electronic Engineering (IC4ME2), Rajshahi, Bangladesh, pp. 1-4. https://doi.org/10.1109/IC4ME247184. 2019.9036492

[7] Hanafiah, Z.M., Hamid, N.H.A., Taib, M.N. (2011). Theta, alpha and beta band frequencies of different nicotine dependency level among smokers. In 2011 IEEE 7th International Colloquium on Signal Processing and its Applications, Penang, Malaysia, pp. 80-83. https://doi.org/10.1109/CSPA.2011.5759847

[8] Hanafiah, Z.M., Murat, Z.H., Taib, M.N., Lias, S. (2010). Initial investigation of the Alpha and Beta bands for smokers using EEG. In 2010 6th International Colloquium on Signal Processing & Its Applications, Malacca, Malaysia, pp. 1-4. https://doi.org/10.1109/CSPA.2010.5545288

[9] Su, S., YU, D., Bu, L., Ma, Y., Chen, Y., Zhang, X., Yuan, K. (2017). The changes of EEG signals during resting state in adolescents with smoking addiction. Chinese Journal of Behavioral Medicine and Brain Science, (12): 1021-1024.

[10] Chin, L.C., Zazid, A.M., Fook, C.Y., Vijean, V., Awang, S.A., Affandi, M., Chee, L.S. (2019). Differentiate characteristic EEG tobacco smoking and non-smoking. Journal of Physics: Conference Series, 1372(1): 012055. https://doi.org/10.1088/1742-6596/1372/1/012055

[11] Hasan, M.M., Hasan, N., Alsubaie, M.S.A., Komol, M.M.R. (2021). Diagnosis of tobacco addiction using medical signal: An EEG-based time-frequency domain analysis using machine learning. Advances in Science, Technology and Engineering Systems, 6(1): 842-849. https://doi.org/10.25046/aj060193

[12] Hanafiah, Z.M., Taib, M.N., Hamid, N.H.A. (2010). EEG pattern of smokers for Theta, Alpha and Beta band frequencies. In 2010 IEEE Student Conference on Research and Development (SCOReD), Kuala Lumpur, Malaysia, pp. 320-323. https://doi.org/10.1109/SCORED.2010.5704025

[13] Pesen, S.F., Karadoğan, S., Akbulut, A. (2021). Tobacco use of the world and in turkey and tobacco control policy an overview. Turkey Health Literacy Journal, 2(3): 191-196. https://doi.org/10.54247/SOYD.2021.41

[14] Sheykhivand, S., Rezaii, T.Y., Mousavi, Z., et al. (2022). Automatic detection of driver fatigue based on EEG signals using a developed deep neural network. Electronics, 11(14): 2169. https://doi.org/10.3390/ELECTRONICS11142169

[15] Wang, Y., Bai, Y., Xia, X., Niu, Z., Yang, Y., He, J., Li, X. (2021). Comparison of synchrosqueezing transform to alternative methods for time-frequency analysis of TMS-evoked EEG oscillations. Biomedical Signal Processing and Control, 70: 102975. https://doi.org/10.1016/J.BSPC.2021.102975

[16] Heatherton, T.F., Kozlowski, L.T., Frecker, R.C., Fagerstrom, K.O. (1991). The Fagerström test for nicotine dependence: A revision of the Fagerstrom Tolerance Questionnaire. British Journal of Addiction, 86(9): 1119-1127. https://doi.org/10.1111/J.1360-0443.1991.TB01879.X

[17] Pomerleau, C.S., Carton, S.M., Lutzke, M.L., Flessland, K.A., Pomerleau, O.F. (1994). Reliability of the Fagerstrom tolerance questionnaire and the Fagerstrom test for nicotine dependence. Addictive Behaviors, 19(1): 33-39. https://doi.org/10.1016/0306-4603(94)90049-3

[18] Kunze, U., Schmeiser-Rieder, A., Schoberberger, R. (1998). European Medical Association Smoking or Health (EMASH)--consensus on smoking cessation: Guidelines for physicians. Sozial-und Praventivmedizin, 43(3): 167-172. https://doi.org/10.1007/BF01359725

[19] Uysal, M.A., Kadakal, F., Karşidağ, C., Bayram, N.G., Uysal, O., Yilmaz, V. (2004). Fagerstrom test for nicotine dependence: Reliability in a Turkish sample and factor analysis. Tuberk Toraks, 52(2): 115-121.

[20] Klem, G.H. (1999). The ten-twenty electrode system of the international federation. The international federation of clinical neurophysiology. Electroencephalogr Clin Neurophysiol Suppl., 52: 3-6. 

[21] Oostenveld, R., Praamstra, P. (2001). The five percent electrode system for high-resolution EEG and ERP measurements. Clinical Neurophysiology, 112(4): 713-719. https://doi.org/10.1016/S1388-2457(00)00527-7

[22] The 10-20 System for EEG - Electrophysiological Research Blog, News & Events - TMSi. 2023. https://info.tmsi.com/blog/the-10-20-system-for-eeg.

[23] Zhang, D., Zhang, D. (2019). Wavelet transform. Fundamentals of Image Data Mining: Analysis, Features, Classification and Retrieval, 35-44. https://doi.org/10.1007/978-3-030-17989-2_3

[24] Hamad, A., Houssein, E.H., Hassanien, A.E., Fahmy, A.A. (2016). Feature extraction of epilepsy EEG using discrete wavelet transform. In 2016 12th International Computer Engineering Conference (ICENCO), Cairo, Egypt, pp. 190-195. https://doi.org/10.1109/ICENCO.2016.7856467

[25] Ocak, H. (2009). Automatic detection of epileptic seizures in EEG using discrete wavelet transform and approximate entropy. Expert Systems with Applications, 36(2): 2027-2036. https://doi.org/10.1016/J.ESWA.2007.12.065

[26] Daubechies, I. (1990). The wavelet transform, time-frequency localization and signal analysis. IEEE Transactions on Information Theory, 36(5): 961-1005. https://doi.org/10.1109/18.57199

[27] McFarland, D.J., Wolpaw, J.R. (2011). Brain-computer interfaces for communication and control. Communications of the ACM, 54(5): 60-66. https://doi.org/10.1145/1941487.1941506

[28] Klema, V., Laub, A. (1980). The singular value decomposition: Its computation and some applications. IEEE Transactions on Automatic Control, 25(2): 164-176. https://doi.org/10.1109/TAC.1980.1102314

[29] Onay, F.K., Köse, C. (2019). Power spectral density analysis in alfa, beta and gamma frequency bands for classification of motor EEG signals. In 2019 27th Signal Processing and Communications Applications Conference (SIU), Sivas, Turkey, pp. 1-4. https://doi.org/10.1109/SIU.2019.8806385

[30] Türk, Ö., Özerdem, M.S., Akpolat, N. (2015). Determination of changes in frequencies of EEG signal in eyes open/closed duration-Gözler açık/kapalı durumunda EEG bantlarındaki frekans değişiminin Güç Spektral Yoğunluğu ile belirlenmesi. Dicle University Journal of Engineering, 6(2): 131-138.

[31] Welch, P. (1967). The use of fast Fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms. IEEE Transactions on Audio and Electroacoustics, 15(2): 70-73. https://doi.org/10.1109/TAU.1967.1161901

[32] Naderi, M.A., Mahdavi-Nasab, H. (2010). Analysis and classification of EEG signals using spectral analysis and recurrent neural networks. In 2010 17th Iranian Conference of Biomedical Engineering (ICBME), Isfahan, Iran, pp. 1-4. https://doi.org/10.1109/ICBME.2010.5704931

[33] Fadzal, C.C.W., Mansor, W., Khuan, L.Y., Mohamad, N.B., Mahmoodin, Z., Mohamad, S., Amirin, S. (2014). Welch power spectral density of EEG signal generated from dyslexic children. In 2014 IEEE REGION 10 SYMPOSIUM, Kuala Lumpur, Malaysia, pp. 560-562. https://doi.org/10.1109/TENCONSPRING.2014.6863097

[34] Uyulan, Ç., Ergüzel, T.T., Tarhan, N. (2019). Use of deep learning algorithms in the analysis of electroencephalography-based signals. The Journal of Neurobehavioral Sciences, 108: 108-124. https://doi.org/10.5455/JNBS.1553607558