Next Article in Journal
Impact Assessment of Electric Bus Charging on a Real-Life Distribution Feeder Using GIS-Integrated Power Utility Data: A Case Study in Brazil
Next Article in Special Issue
Diffusion-Based Anonymization and Foundation Model-Powered Semi-Automatic Image Annotation for Privacy-Protective Intelligent Connected Vehicle Traffic Data
Previous Article in Journal
A Novel Model Chain for Analysing the Performance of Vehicle Integrated Photovoltaic (VIPV) Systems
Previous Article in Special Issue
Robust 3D Object Detection in Complex Traffic via Unified Feature Alignment in Bird’s Eye View
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Efficient Drowsiness Detection Framework for Improving Driver Safety Through Supervised Learning Models

College of Engineering and Technology, American University of the Middle East, Egaila 54200, Kuwait
World Electr. Veh. J. 2025, 16(11), 620; https://doi.org/10.3390/wevj16110620
Submission received: 31 August 2025 / Revised: 18 October 2025 / Accepted: 27 October 2025 / Published: 13 November 2025
(This article belongs to the Special Issue Recent Advances in Intelligent Vehicle)

Abstract

Nowadays, we live in the smart mobility era in which vehicles are equipped with small sensing devices to collect various road information. With such sensors, we are able to provide an overview of what is happening on the road and offer an efficient solution for transport problems such as congestion, accidents, avoiding traffic lights, fuel consumption, etc. Particularly, driver drowsiness is one of the most important problems that transportation systems face and mostly leads to severe accidents, injuries, and deaths. In order to overcome such a problem, a set of sensor devices has been integrated into vehicles to monitor driver and driving behaviors, and then to evaluate the driver’s situation, e.g., drowsy or awake. Unfortunately, most of the proposed drowsiness detection techniques are dedicated to analyzing one behavior type, but not both, which may affect the accuracy rate of the detection. In this paper, we propose an efficient drowsiness detection framework (RDDF) that may analyze one behavior or be adapted to both of them in order to increase the accuracy of drowsiness detection. Mainly, RDDF periodically monitors the driver and driving behaviors, extracts important patterns, and then uses and compares a set of supervised learning models to detect drowsy drivers. After that, RDDF proposes a modified version of the K-nearest neighbors (KNN) model called Jaccard-KNN (JKNN) that increases drowsiness detection accuracy and overcomes several challenges imposed by traditional models. The proposed framework has been preliminarily validated through real sensor data, and we show the effectiveness of our framework in detecting real-time drowsy drivers with an accuracy rate of up to 99 % .

1. Introduction

Mobility is a critical element of our society. Thus, most governments and societies give significant attention to building an efficient transportation system that ensures faster and safer mobility of their citizens. Recently, the emergence of smart sensing devices is set to push the transportation systems to the next level, mostly known as smart mobility (SM) or intelligent transportation system (ITS), and it has been a driving force behind the increase in the traditional system performance and safety at a lower cost [1,2]. With the help of sensors, the sensing technology allows government and authorities to obtain live data about traffic roads, and then make accurate and quick decisions about any event that has occured or an abnormal situation. Subsequently, traffic data collection benefits include the reduction in traffic congestion and saving traveler time, identification of vehicles disobeying a speed limit or red light, improvement in traffic safety, rapid detection of accidents, reduction in infrastructure damage, parking management, and vehicle violation detection [3,4]. Therefore, it becomes essential to deploy and enable new services and applications that take advantage of the collected traffic data in order to optimize and increase the efficiency of the transportation systems.
In this work, we are interested in driver drowsiness detection as one of the most important safety issues studied in ITS. Unfortunately, the number of accidents, along with the resulting injuries and deaths because of the drowsiness problem, has increased over the last years with more than 1.3 million accidents per year [5]. This is due to many factors that contribute to such a problem, such as depression, sleep disorders, shift workers, long driving time, road monotony, medication, etc. [6,7]. Indeed, sensing-based technology offers two categories of sensors to detect the drowsiness problem: driving-based and driver-based. The first category monitors driving behavior such as vehicle lane deviation, steering wheel movement, and vehicle speed, whilst the second category measures the driver’s behavior such as eye and head movements, facial expression, and organ activities through several physiological signals such as Electroencephalography (EEG), Electrooculography (EOG), and Electrocardiography (ECG). Thus, after collecting driver behavioral measures, researchers mainly use machine or deep learning models to determine the driver’s situation as awake or drowsy. However, most of the proposed techniques suffer from three main drawbacks [8,9]: First, they are dedicated to analyzing one behavioral category or, sometimes, limited to one categorical measure but they cannot be generalized to all of them. Second, the accuracy of the drowsiness detection is highly related to the tested dataset; thus, the overfitting problem is very likely to happen. Third, they mostly give a lower performance in terms of precision and F-measure when dealing with an imbalanced data problem.
In this paper, we propose an efficient design that analyzes one or several behavioral categories in order to detect drowsy drivers while ensuring a high accuracy level. The proposed design is called RDDF, which periodically monitors various measures for driving and driver behaviors for a later analysis and decision-making. Indeed, RDDF is mainly two-fold: First, it tests and compares the performance of various supervised learning models in terms of detecting the drowsiness problem, such as logistic regression (LR), random forest (RF), decision tree (DT), naïve Bayes (NB), K-nearest neighbors (KNN), and multi-layer perceptron (MLP). Second, it proposes JKNN that increases the accuracy of drowsiness detection as well as overcoming several challenges imposed by traditional models.
The remainder of this paper is organized as follows: Section 2 presents an overview of various driving and driver behavioral analysis techniques related to drowsiness detection existing in the literature. Section 3 describes the design of RDDF while detailing each of its phases. Section 4 describes the implementation of RDDF and explains the obtained results. Finally, Section 5 concludes the paper and gives directions for future work.

2. Related Work

In the literature, one can find a wide range of techniques dedicated to addressing the driver drowsiness problem [10,11]. Mainly, researchers have focused either on driving-related or driver-related measures to analyze the current behavior and determine the driver’s situation. The authors of [12] provide an overview of various measures and products used to detect drowsy drivers, while those of [13,14] present a comprehensive survey of different learning models used for driver behavior analysis.
On the one hand, researchers of [15,16,17,18] proposed drowsiness detection techniques based on driving behavior analysis. The authors of [15] introduced a novel method based on vehicle speed measurements to recognize risky driving behavior. First, the proposed method searches for the key distribution pattern of each driver that corresponds to the positive speed-change ratio within various speed ranges. Then, it uses the support vector machine (SVM) model to determine risky drivers based on the overall patterns of all drivers. In [16], the authors proposed a feature- and prediction-based approach to detect drowsy drivers in three main steps: The first step periodically monitors driving behavior based on acceleration, braking, and steering wheel metrics. The second step extracts four features (i.e., mean, variance, entropy, and power) from each collected data set, and then assigns a weight to each measure based on the Pearson correlation coefficient. The last step applies two predictive models, e.g., classification and regression, where a decision tree and an ensemble classifier are used to evaluate the performance. The authors of [17] introduced a feature-based selection method based on steering wheel movement for driver drowsiness detection. First, the technique applies four filter indexes (i.e., Fisher, correlation, t-test, and mutual information) to extract time- and frequency-domain features from steering wheel records. Then, the most important features are selected according to a fuzzy inference system before applying the SVM model to classify the driver’s situation as awake or drowsy. In [18], the authors proposed a convolutional neural network (CNN)-based model to detect driver behavior using driving signals such as gravity, speed, throttle, acceleration, and revolutions per minute (RPM). The proposed model first converts the temporal dependencies and overlapping time windows of signals into images through the recurrence plot (RP) technique. Then, the images are passed to the CNN model to classify the driver’s state into five types: normal, aggressive, distracted, drowsy, and drunk.
On the other hand, some works such as [19,20,21,22] are dedicated to driver behavior-based analysis for drowsiness detection. In [19], the authors proposed an efficient technique for driver sleepiness detection that combines wavelet transform (WT) and long short-term memory (LSTM) models. The intuition of the technique is based on the fact that EEG and EOG signals vary correspondingly when alpha phenomenon occurs. Hence, the authors used the wavelet transform to calculate the variation in EEG and EOG signals in the time and frequency domains, followed by the LSTM model to classify various waveforms into sleep or alert states. The authors of [20] proposed PCANet, which integrates principal component analysis (PCA) and a deep learning framework for efficient driver fatigue detection. First, PCA is used to preprocess multi-channel EEG signals and reduce the data dimensionality in order to overcome the dimensionality explosion problem. Then, the SVM and KNN models are employed to classify the EEG signals and determine the fatigue level. In [21], the authors proposed an adaptive multi-scale entropy technique based on the EEG data for fatigue-related driving detection. The proposed technique combines an adaptive scaling factor (ASF) and an entropy-based feature extraction method; ASF is used to scale down the length of the signal, while the entropy method is used to extract signal features for classification.
Finally, a few studies such as [23,24] proposed hybrid solutions that analyze both driving and driver behaviors to detect fatigue states. In [23], the authors developed two CNN models to detect the degree of drowsiness every minute and to predict moderate drowsiness, respectively. Both models rely on the analysis of physiological and behavioral measures such as heart rate, head and eye movements, lane deviation, speed, steering wheel angle, etc. The authors of [24] introduced a mathematical model based on the cumulative time effect to monitor the development of the drowsiness state. The proposed model defines a mixed-effect ordered logit function and an increasing temporal function to evaluate the variation in lane deviation and driver eye closure as a function of time. Consequently, it detects drowsy drivers when an abnormal variation is observed.

3. RDDF: Design Description

The flowchart shown in Figure 1 presents the general process of RDDF, starting from the driver data acquisition to the drowsiness detection phase. Mainly, the proposed framework periodically monitors driving and driver measures, and then generates a dataset composed of shapelets that represent the driver’s state. After that, the dataset is split into training and testing sets before applying a set of classification models, including the newly proposed model, to determine the driver’s state, e.g., alert or drowsy. Finally, the driver’s database is updated according to the driver’s behavior. In the following sections, we describe each step of the proposed framework in detail.

3.1. Measured Data Acquisition

The first step in our framework is to collect data on various driver and driving measures. Indeed, the data acquisition phase consists of three processes: experiment and simulation setup, shapelet generation, and shapelet labeling. 

3.1.1. Experiment and Simulation Dataset Description

On the one hand, we used experimental data from 40 subjects collected in real driving and simulator environments within the VTD project [25] (Figure 2). The VTD driving dataset includes moment-by-moment binary annotations (0 = alert; 1 = drowsy) produced by the VTD data collection team; these annotations are supplied with the dataset and were used as the ground truth for all driving-based measures in our experiments. The VTD annotations were obtained by the dataset authors through synchronized behavioral/video review and signal monitoring during the driving and simulation sessions; we used these author-provided labels directly, with no further re-labeling. For each subject, we focused, in this study, on four attributes that capture driving behavior: steering wheel angle (SWA), pedal pressure (PP), vehicle speed (VS), and transverse angular velocity (TAV). Each subject’s recordings are segmented into fixed-length windows, and the corresponding features are calculated in both mean and standard deviation forms, resulting in synchronized time series suitable for drowsiness analysis. More formally, we considered that the raw dataset of VTD experiments, D E , is defined as D E = { F 1 E , F 2 E , , F 40 E } , where each file F i E corresponds to one subject and contains a multivariate time-series representation of the four attributes, e.g., F i E = { A 1 , A 2 , , A 4 } . On the other hand, we used a publicly available EEG driver drowsiness dataset described in [26]. This EEG dataset includes per-sample binary labels (0 = awake; 1 = drowsy), which we also used directly as ground truth for the EEG measure. The data was collected using an Emotiv EPOC+ headset from a single EEG channel, and then preprocessed to filter and remove noise before storage. The dataset consists of 17 CSV files, where each file contains around 115,200 readings; 52.9 % of those readings are labeled as drowsy, while the remainder represent the awake state. Similarly, we considered that the raw dataset of simulations, D S , is represented as follows: D S = { F 1 S , F 2 S , , F 17 S } , where each file F i S contains only one attribute, e.g., the EEG signal.

3.1.2. Shapelet Generation

As already mentioned, our proposed framework is flexible and can detect driver’s drowsiness based on driving or driver behavior separately or simultaneously. In this paper, we defined the following set of measures: M = { S W A , P P , V S , T A V , E E G } . Subsequently, we adopted a periodic model to analyze the data of each measure and detected the driver’s drowsiness state. In this model, each measure is monitored for a fixed window of length T seconds, where the collected data are represented by a vector of readings called a shapelet, defined as follows: H i j = { m 1 , m 2 , , m T } , where T is the total number of readings collected during the window and j corresponds to the measure M j M . Thus, the entire data collected for each measure M j in an experiment or a simulation file (e.g., F i E or F i S ) are considered as a set of shapelets H j = { H 1 j , H 2 j , , H α j } , where α is the total number of shapelets generated for the measure M j .

3.1.3. Independence and Coupling Analysis

Since the indicators originate from distinct sensing modalities (vehicle dynamics and EEG), they are expected to capture complementary aspects of the driver’s state rather than redundant information. To verify this assumption quantitatively, we computed the pairwise Pearson correlation matrix among the four driving indicators (SWA, PP, VS, and TAV) and the EEG-derived drowsiness index (Table 1). All the absolute correlation coefficients were below 0.45, indicating only weak to moderate correlations between variables. To further assess potential multicollinearity, we calculated the Variance Inflation Factor (VIF) for each indicator, and all the values were less than 2, confirming the absence of significant collinearity. Given this low interdependence, no explicit de-correlation or dimensionality reduction (e.g., PCA) was required prior to the shapelet generation.

3.1.4. Shapelet Labeling

After generating shapelets for each measure, the last step of this phase aims to assign a label to each shapelet indicating the driver’s situation. The idea behind shapelet labeling is to allow supervised learning models to recognize or classify the driver’s state, either drowsy or awake. In our framework, the shapelet labeling process is defined such that a shapelet H i j is labeled as 1 (i.e., drowsy state) if all its readings indicate a drowsy state, and 0 otherwise. In the VTD dataset, the driver’s state is explicitly annotated using a binary label. A value of 0 indicates an alert (normal) state, whereas 1 corresponds to a drowsy state at each recorded moment. Similarly, in the EEG dataset, every signal sample is already labeled as 0 (awake) or 1 (drowsy) by the dataset provider. Therefore, we assumed that each shapelet H i j has its corresponding label L i j { 0 , 1 } . Formally, if L t denotes the provided label (0/1) at timestamp t inside the window, then
L i j = 1 , if t window i , L t = 1 , 0 , otherwise .
We chose this “all-samples” rule because it reduces the occurrence of spurious (single-sample) positive labels and helps prevent excessive false alarms when using short windows (T = 2–4 s). To assess the sensitivity of our results to this choice, we additionally tested two alternative aggregation rules: a majority vote rule and a ≥50% threshold. However, the conclusions about relative classifier performance and the superiority of the JKNN model remain robust across these aggregation choices. At the end of this phase, a database D is created, containing the shapelet sets for all measures in M : D = { H 1 , H 2 , , H 5 } , where H j corresponds to the measure M j M .

3.2. Data Classification and Drowsiness Detection

The second phase of our framework aims to classify and detect the driver’s state through a set of supervised learning models. Subsequently, this phase consists of three main processes that are described in the following sections.

3.2.1. Database Division

For performance evaluation purposes, we divided the database D into two partitions: training data, which consist of β % of the overall data, and testing data, which consist of the remaining portion. The division process adopted in our framework is mainly based on the subjects instead of the shapelets. For instance, when β = 50 , half of the files in D E and D S corresponding to the subjects are considered as training data, and the other half are used for the testing process. Consequently, we consider that the shapelet sets for measures corresponding to the training data are represented by D t r = { H t r 1 , H t r 2 , , H t r 5 } , and those corresponding to the testing data are represented by D t e = { H t e 1 , H t e 2 , , H t e 5 } .

3.2.2. Classifiers Description

Indeed, researchers have proposed many classification methods, each with its own process and performance, and none of them can be regarded as universally optimal for all applications. In this section, we applied a set of supervised methods to the testing data in order to identify the driver’s state. Indeed, one can find a wide range of supervised models in the literature, each with its own process and performance. Thus, our objective is to apply several classifiers rather than focusing on a single one, and subsequently select the model that achieves the best performance in detecting driver drowsiness. In this work, we tested six standard classifiers, followed by the proposal of a new model, which are described as follows:
  • Logistic Regression (LR) [27]: It is a statistical model that employs a logistic function combined with stochastic gradient descent to predict the class category of a given feature set. LR has been widely tested in numerous studies to detect driver drowsiness [28,29]. In this paper, we used the default parameters of LR provided by the scikit-learn library.
  • Random Forest (RF) [30]: This is an ensemble learning method that can be efficiently applied for both classification and regression based on multiple hierarchical decision trees during the training phase. Subsequently, the classification output of the RF is the class selected by the majority of trees, while the regression output is the average value of all tree predictions. RF has also demonstrated its potential in outperforming the accuracy of the standard decision tree classifier for driver drowsiness detection [31,32]. In this work, the default values of the random forest classifier implemented in scikit-learn are considered, where the number of trees is fixed to 100.
  • Decision Tree (DT) [33]: It is a decision support tool based on a tree structure and if–then–else decision rules. DT is commonly used in various operations research and decision analysis domains, particularly for driver drowsiness detection [34,35,36]. The decision tree algorithm is implemented in the scikit-learn library, where the default parameters, such as tree depth and feature index, are considered in this paper to automatically select the best decision based on the feature set.
  • Naïve Bayes (NB) [37]: It is a probabilistic classifier based on Bayes’ theorem with strong independence assumptions between features. NB has demonstrated its computational efficiency in various domains, including drowsiness detection [38,39]. The scikit-learn library provides several models for Naïve Bayes implementation, of which we used the Gaussian model in this work.
  • K-Nearest Neighbors (KNN) [40]: It is one of the simplest learning classifiers that does not require creating a training model. The core of KNN mainly depends on measuring the distance between the training and testing data. Furthermore, KNN has shown strong performance in detecting drowsiness through a large number of studies [41,42]. By default, scikit-learn uses KNN with K = 5 and the Minkowski distance with uniform weights.
  • Multi-Layer Perceptron (MLP) [43]: It is a supervised learning method based on an artificial neural network and the backpropagation algorithm for training. Mainly, MLP consists of three layers (input, hidden, and output) and uses an activation function to determine the predicted class. Furthermore, MLP is widely used in drowsiness detection [44,45], and we set the number of neurons in scikit-learn to 500, 250, and 40 for the three layers, respectively.
  • Jaccard-based K-Nearest Neighbors (JKNN): In general, KNN uses a distance metric, such as Euclidean, to measure the difference between independent vectors of testing and training data. However, a distance metric is usually appropriate for data that do not exhibit direct correlation or temporal factors among their values. Hence, it is often preferable to use similarity metrics in applications where the information is temporally organized, thus considering correlation in the similarity measure proves to be more appropriate and can even yield more accurate results. In this work, we focused on the Jaccard coefficient to gauge the similarity and diversity between sample sets, as it has been used in a wide range of applications including community detection in social networks [46], document and web page plagiarism detection [47], attack detection [48], and market analysis [49]. Thus, the Jaccard similarity J a c ( H i j ) between two shapelets H i j D t r and H k j D t e that correspond to the same measure j is calculated as follows:
    J a c ( H i j , H k j ) = | H i j H k j | 2 × T | H i j H k j |
    Then, the same concept of KNN is applied, but in this case, the nearest shapelets are selected according to the Jaccard similarity measure, with the number of neighbors set to K = 5 .

3.2.3. Drowsiness Detection

In order to detect driver drowsiness, we applied classifiers based on the generated shapelets instead of applying them directly to each record, as is commonly done in most existing works. In addition, RDDF is highly flexible, as it can detect driver drowsiness based on a single measure, either driving or driver behavior, or on multiple measures, such as both.
  • Single-Measure Drowsiness Detection: In this scenario, we applied each classifier based on each measure M j M to analyze the driver or driving behavior. Algorithm 1 shows the process of single-measure drowsiness detection, which takes as input the training shapelets of the monitored measure along with the desired classifier, and produces as output the driver’s state according to the testing shapelets. The process starts by defining a set that stores all driver states of the testing shapelets, e.g., s t a t e s _ s e t (line 1). Then, for each shapelet in the testing set, its corresponding readings are considered as feature vectors before applying the selected classifier (lines 2–4). Once the predicted state is returned by the classifier, e.g., L i j , it is added to the list of driver states (lines 4–5). Finally, the performance metrics (accuracy, precision, recall, and F1) of the classifier are calculated (see Equations (2) to (5)), and the driver state is returned (lines 7–14).
    Algorithm 1 Single-Measure Drowsiness Detection Algorithm
    Require: 
     A measure: M j M ; Training data of a measure: H t r j D t r ; Testing data of a measure: H t e j D t e ; A classifier: C.
    Ensure: 
     Driver state: awake or drowsy.
     1:
      s t a t e s _ s e t
     2:
     for each H i j H t e j  do
     3:
        consider each m k H i j as a feature
     4:
         L i j = apply_classifier (C, H i j , H t r j )
     5:
         s t a t e s _ s e t s t a t e s _ s e t { L i j }
     6:
     end for
     7:
     [accuracy, precision, recall, F1] = confusion_matrix ( s t a t e s _ s e t , H t e j )
     8:
     for each L i j s t a t e s _ s e t  do
     9:
        if  L i j = 0  then
     10:
        return awake
     11:
      else
     12:
        return drowsy
     13:
      end if
     14:
    end for
    A c c u r a c y = T P + T N T P + T N + F P + F N
    P r e c i s i o n = T P T P + F P
    R e c a l l = T P T P + F N
    F 1 = 2 × P r e c i s i o n × R e c a l l P r e c i s i o n + R e c a l l
    where
    T P : A shapelet from the testing data that represents a drowsy state and is correctly predicted as drowsy by the classifier.
    T N : A shapelet from the testing data that represents an awake state and is correctly predicted as awake by the classifier.
    F P : A shapelet from the testing data that represents a drowsy state and is incorrectly predicted as awake by the classifier.
    F N : A shapelet from the testing data that represents an awake state and is incorrectly predicted as drowsy by the classifier.
  • Multi-Measure Drowsiness Detection: In this scenario, each classifier is applied to several measures at the same time. Algorithm 2 shows the process of multi-measure drowsiness detection, which takes as input the training shapelets of all the measures in D t r , except for EEG since it is not included in our experiments, along with the total number of shapelets (e.g., α ) and the desired classifier. On the other hand, Algorithm 2 returns as output the driver’s state, similarly to that of single-measure drowsiness detection. The algorithm process is divided into four steps: The first step, called multi-shapelet labeling (lines 1–10), monitors both driver and driving behaviors and concatenates the corresponding shapelets of all the measures into a single shapelet (line 3). Then, the concatenated shapelet is assigned a label of 1 if all the measures indicate a drowsy state and 0 otherwise, before being added to the labeled shapelet list (line 9). The second step, called data classification (lines 11–15), applies each classifier to the concatenated shapelets in the testing data (line 13) while adding the predicted state of each shapelet to the list of the predicted ones (line 14). The third and fourth steps, called classification performance (line 16) and driver-state determination (lines 17–23), compute the performance metrics of the classifier and return the driver’s state, similar to the process described in Algorithm 1.
    Algorithm 2 Multi-Measure Drowsiness Detection Algorithm
    Require: 
     Set of measures: M { E E G } ; Training data: D t r ; Testing data: D t e ; Number of total shapelets of each measure: α ; A classifier: C.
    Ensure: 
     Driver state: awake or drowsy.
     1:
      L
     2:
     for  i = 1 to α  do
     3:
         H i 1 4 = H i 1 H i 2 H i 3 H i 4
     4:
        if  L i 1 = 1 and L i 2 = 1 and L i 3 = 1 and L i 4 = 1  then
     5:
           L i 1 4 = 1
     6:
        else
     7:
           L i 1 4 = 0
     8:
        end if
     9:
         L L { ( H i 1 4 , L i 1 4 ) }
     10:
    end for
     11:
    s t a t e s _ s e t
     12:
    for each ( H k 1 4 , L k 1 4 ) L where H k 1 4 D t e  do
     13:
        p r e d i c t e d _ L k 1 4 = apply_classifier (C, H k 1 4 , D t r )
     14:
        s t a t e s _ s e t s t a t e s _ s e t { p r e d i c t e d _ L k 1 4 }
     15:
    end for
     16:
    [accuracy, precision, recall, F1] = confusion_matrix ( s t a t e s _ s e t , D t e )
     17:
    for each p r e d i c t e d _ L 1 4 s t a t e s _ s e t  do
     18:
       if  p r e d i c t e d _ L 1 4 = 0  then
     19:
         return awake
     20:
       else
     21:
         return drowsy
     22:
       end if
     23:
    end for

3.3. Driver Notification and Database Updating

After determining the driver’s state based on single- or multi-measures, a notification is sent to the driver only when a drowsiness state is detected. Subsequently, a notification may take several forms, including a signal to take a timely break, a coffee break, an alarm, the activation of music, etc. On the other hand, drivers differ visually and behaviorally while driving. For instance, a driver who makes several successive deviations may be experiencing inattention (e.g., a drowsy or distracted state), whereas the same behavior may indicate an alert driver intending to overtake other vehicles. Thus, the database stored in the vehicle may not fit the behavior of the driver who purchased it. To overcome this problem, we proposed dynamically updating the database according to the vehicle’s owner. Hence, when a drowsiness state is detected, we proposed replacing the current shapelet with the most similar one, e.g., the one having the highest Jaccard similarity score, saved in the database. Consequently, after a certain driving period, the updated database will more accurately reflect the driver’s individual behavior.

4. Performance Evaluation

In order to evaluate the effectiveness of RDDF, we used experiments with both locally executed tests and publicly available datasets as explained in Section 3.1.1. We used a laptop equipped with a 64-bit six-core Intel Core i7-4800MQ processor running at 2.7 GHz. In addition, the system was configured with 16 GB of RAM and a storage capacity of 512 GB. The machine ran on Windows 10, and the framework used in the implementation was Python 3.10. Furthermore, we fixed the percentage of training data β to 90 % , and the remaining portion was used for testing data. Furthermore, to assess model generalization, a Leave-One-Subject-Out (LOSO) cross-validation scheme was additionally applied. Model performance was averaged across subjects and reported as mean ± standard deviation over five random data splits.

4.1. Rationale for T Selection

In our simulation, we selected window lengths T = { 2 , 3 , 4 } seconds for the experiments. The selection was driven by practical considerations: windows shorter than 2 s reduce the number of samples per window and can miss gradual drowsiness patterns, while windows longer than 4 s increase the detection latency and decrease the responsiveness required for in-vehicle alerts. In addition, for the EEG data collected using consumer headsets with a high sampling rate, a 2–4 s window provides enough samples to compute stable summary statistics (mean and standard deviation) used in our shapelet-based features while being computationally feasible for on-board processing.

4.2. Performance Study of RDDF

In this section, we studied the effectiveness of RDDF in terms of three metrics: behavior type, classifier performance, and window length. Table 2 shows the performance metrics (e.g., accuracy, precision, recall, and F1) of each classifier when applying our technique to each behavioral measure individually or to all the measures simultaneously (e.g., column { S W A , P P , V S , T A V } ). The obtained results are highly dependent on the window length (T), and several noteworthy observations can be made:
  • In the best case, RDDF ensures up to 99.8 % accuracy, 99 % precision, 100 % recall, and 99 % F1-score. Otherwise, in the worst case, RDDF drops to 43 % accuracy, 3 % precision, <1% recall, and <1% F1-score. This decrease occurs because certain classifiers are not suitable for the given dataset characteristics. Across ten repeated data splits, the standard deviation was ± 0.42 % , confirming consistent model performance with low variance despite the limited sample size.
  • Classifiers exhibit varying performance depending on each measure and the window length T. Indeed, we observed that there is no classifier that outperforms all the others across all the performance metrics. However, JKNN achieves superior classification results in most cases compared to the other classifiers. This is because the Jaccard similarity acts as a strict constraint, ensuring minimal classification error compared with the conditions used in other classifiers. Thus, it is unlikely that a shapelet labeled as drowsy would be similar to one labeled as awake according to the Jaccard similarity. Moreover, JKNN is generally followed by the RF classifier in performance metrics, mainly due to the large number of trees used in RF (e.g., 100). Subsequently, the classifiers are ordered according to the average accuracy as follows: JKNN ( 97.6 % ), random forest ( 91.1 % ), K-nearest neighbor ( 89.5 % ), decision tree ( 89.1 % ), logistic regression ( 88.5 % ), multi-layer perceptron ( 87.9 % ), and naïve Bayes ( 78.1 % ).
  • The performance of all the classifiers is relatively stable when varying the window length. On the one hand, this indicates that our technique can provide fast and accurate drowsiness detection even with a short driver monitoring period (e.g., T = 2 s). On the other hand, this implies that the technique can reduce the frequency of driver alerts when using a longer monitoring period (e.g., T = 4 s).
  • The performance of each classifier varies dynamically according to the monitored measure. First, the performance of a classifier changes depending on whether a single or multiple measure is monitored. For instance, the average accuracy of RF reaches 95.8 % for each separate measure (SWA, PP, VS, and TAV), while it increases to 98 % when all the measures are combined (i.e., SWA, PP, VS, and TAV). Second, the performance of the classifier also varies according to the type of measure, either driver or driving behaviors. For instance, the average accuracy of RF achieves 95.5 % for driving-based measures (e.g., SWA, PP, and VS) and 76.6 % for driver’s-based measures (e.g., TAV and EEG). This is mainly because the shapelets representing driver’s behavior vary significantly compared to those of driving behavior.
  • The recall metric in JKNN is consistently equal to 1. This is because a shapelet indicating the awake state is highly unlikely to resemble that of the drowsy state according to the Jaccard similarity. Thus, F N is always equal to 0, and the recall metric correspondingly equals 1.
  • The obtained results of precision, recall, and F1-score metrics of JKNN outperform those of conventional classifiers. This is due to the imbalanced data problem facing standard classifiers, which is effectively resolved in the new version of the classifier (e.g., JKNN); in fact, JKNN mostly focuses on the drowsy shapelets to classify the testing data independently of its size. Subsequently, we can notice that precision, recall, and F1 metrics mostly exceed 81 % in JKNN while they mostly remain below 50 % using standard classifiers.

4.3. Training Time Analysis

Table 3 shows the training time of each classifier used in the RDDF framework for the same hardware configuration. The results demonstrate that the training time increases consistently with the window length T, since larger windows produce higher-dimensional feature vectors and more training samples. Among conventional classifiers, naïve Bayes and decision tree require the least time to train (below two seconds for all T values), reflecting their simple parameter estimation and tree construction procedures. logistic regression and random forest exhibit moderate training costs, scaling nearly linearly with T. KNN shows negligible training time because the method performs no model fitting; only an optional distance-indexing step is included in the timing. In contrast, the proposed JKNN demands noticeably higher training effort due to the pairwise Jaccard similarity computation between all the training samples. Even so, its training time remains under one minute for the largest window ( T = 4 s), indicating its practical feasibility for onboard or near-real-time applications. The multi-layer perceptron (MLP) requires the longest training time because of its iterative gradient-based optimization; however, the observed increase with T is still roughly proportional to data size, confirming its stable computational scalability. Overall, the measured results demonstrate that while the JKNN method incurs a higher computational cost than the classical distance-based KNN, it provides a reasonable trade-off between accuracy and efficiency, especially for medium window durations ( T = 2 –3 s), where both runtime and recognition performance are balanced.

4.4. RDDF vs. State-of-the-Art: An Analytical Comparison

Table 4 compares the performance of RDDF to several state-of-the-art techniques. The table shows the best accuracy results obtained with each technique while summarizing the publication year, employed models, monitored behavior type, monitored measures, and corresponding accuracy. The following observations can be made based on the table:
  • Most of the proposed techniques are based on machine- and deep-learning methods.
  • The literature shows significant progress in addressing the drowsiness detection problem, with reported accuracies mostly exceeding 90 % , except for [24].
  • Researchers focus equally on driving and driver behaviors for detecting drowsy drivers, and both driving and physiological measures have been extensively investigated in the literature.
  • RDDF is well-positioned in terms of accuracy and shows strong performance compared to other existing techniques. This is mainly because our technique treats each record within a shapelet as an individual feature when classifying the driver’s state. Thus, it outperforms most existing approaches, except for one technique (e.g., [18]) that achieves slightly higher accuracy than RDDF.

4.5. RDDF vs. State-of-the-Art: An Empirical Comparison

To ensure a fair and reproducible comparison, we conducted ten independent runs of each model under identical experimental conditions. The same dataset, preprocessing pipeline, and train–test partitioning used for evaluating RDDF were also applied to the baseline techniques of [18,23]. All the hyperparameters were kept consistent with the authors’ original configurations whenever available, and random seeds were varied across runs to minimize bias. The mean values of accuracy, precision, recall, and F1-score over these ten runs are reported in Table 5. This approach eliminates the influence of dataset or environmental differences, allowing the comparison to focus solely on the intrinsic modeling capability of each technique.
As summarized in Table 5, the proposed RDDF framework consistently outperforms both benchmark techniques across all the evaluation metrics. RDDF achieved an average accuracy of 95.8 % , surpassing [23] ( 92.0 % ) and [18] ( 90.5 % ) by margins of approximately 3– 5 % . Similar improvements are observed in precision, recall, and F1-score, confirming that RDDF provides a more balanced and reliable detection of drowsiness events. These gains can be attributed to the hybrid integration of recurrent dynamic features and discriminative shapelets, which enable the model to capture both temporal evolution and statistical variability. It is also worth noting that the differences between our reproduced results and those originally reported by the respective authors are relatively small, indicating that the re-runs on our simulated dataset yield consistent trends and further confirm the robustness of the comparative analysis.

4.6. RDDF Limitations

Although the proposed framework demonstrates significant efficiency in accurately detecting driver drowsiness rapidly, certain limitations remain that prevent a full validation of the RDDF’s potential in real-world scenarios. In particular, we tested T = 2 , 3, and 4 s to balance detection responsiveness and temporal feature capture. We acknowledged that broader sweeps of T and sliding/overlapping window strategies could reveal additional trade-offs. We, therefore, listed a targeted set of experiments for future work: (i) evaluate T across 1–10 s in 1-s steps for all metrics and measures; (ii) compare non-overlapping vs. sliding windows ( 50 % overlap); and (iii) test adaptive windowing methods and online change-point detectors for lower latency. These directions are expected to yield further improvements and will be pursued in follow-up work.
Second, the JKNN algorithm, while achieving high accuracy, exhibits increased computational complexity when scaling to large datasets or multi-modal signals. As a future direction, we aim to expand the dataset to include multi-channel EEG and complementary behavioral data (e.g., facial or steering signals), develop hybrid fusion approaches to handle multi-modal information, and implement algorithmic optimizations or parallelization strategies to enhance the real-time efficiency of JKNN. Addressing these aspects will further improve the robustness, scalability, and practical applicability of RDDF.

5. Conclusions and Future Work

In this study, a drowsiness detection framework was developed by integrating sensing technologies with supervised learning algorithms. The proposed JKNN-based framework was preliminarily validated using real sensor data, showing a high level of accuracy in detecting driver drowsiness. Through extensive experiments, an accuracy of 99.0 % was achieved on the collected dataset, and 96.8 % on a public dataset, confirming the effectiveness and adaptability of the proposed approach. Comparative analyses with conventional classifiers demonstrated that the JKNN model achieved superior detection performance while maintaining computational efficiency. The impact of varying window lengths and training parameters was also examined, and the results indicated a consistent trend in both accuracy and training time. The findings suggest that driver drowsiness can be effectively detected using a combination of physiological and behavioral sensing data processed by lightweight supervised models. Although the obtained results indicate the feasibility of the framework, further validation using larger and multi-channel datasets is required to confirm robustness and improve generalizability. In future work, we plan to explore real-time deployment and adaptive calibration under dynamic driving conditions to enhance system reliability and user safety.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. El Zein, H.; Harb, H.; Delmotte, F.; Zahwe, O.; Haddad, S. VAS-3D: A Visual-Based Alerting System for Detecting Drowsy Drivers in Intelligent Transportation Systems. World Electr. Veh. J. 2024, 15, 540. [Google Scholar] [CrossRef]
  2. Essahraui, S.; Lamaakal, I.; El Hamly, I.; Maleh, Y.; Ouahbi, I.; El Makkaoui, K.; Filali Bouami, M.; Pławiak, P.; Alfarraj, O.; Abd El-Latif, A.A. Real-time driver drowsiness detection using facial analysis and machine learning techniques. Sensors 2025, 25, 812. [Google Scholar] [CrossRef] [PubMed]
  3. Ahmad Jan, M.; Adil, M.; Brik, B.; Harous, S.; Abbas, S. Making Sense of Big Data in Intelligent Transportation Systems: Current Trends, Challenges and Future Directions. ACM Comput. Surv. 2025, 57, 197. [Google Scholar] [CrossRef]
  4. Ganguly, B.; Dey, D.; Munshi, S. An Attention Deep Learning Framework-Based Drowsiness Detection Model for Intelligent Transportation System. IEEE Trans. Intell. Transp. Syst. 2025, 26, 4517–4527. [Google Scholar] [CrossRef]
  5. Jaulkar, S.; Parihar, A. Different types of injury associated with road traffic accidents. Multidiscip. Rev. 2025, 8, e2025111. [Google Scholar] [CrossRef]
  6. Soares, S.; Monteiro, T.; Lobo, A.; Couto, A.; Cunha, L.; Ferreira, S. Analyzing driver drowsiness: From causes to effects. Sustainability 2020, 12, 1971. [Google Scholar] [CrossRef]
  7. Cao, S.; Feng, P.; Kang, W.; Chen, Z.; Wang, B. Optimized driver fatigue detection method using multimodal neural networks. Sci. Rep. 2025, 15, 12240. [Google Scholar] [CrossRef]
  8. Khanna, M.; Nossam, S.C.; Pulastya, G.; Bandi, H.R.; Anirudh, R. Real-time Driver Drowsiness Detection for safer driving using MESA: A multi-agent based modeling framework. AIP Conf. Proc. 2025, 3237, 020002. [Google Scholar]
  9. Venkatesan, T.; Naveena, S.; Aadhish, M.; Nandha, S. A Smart IoT-Based Framework for Adaptive Drowsiness Detection and Alert Mechanisms for Preventing Fatigue-Induced Accidents. In Proceedings of the 2025 3rd International Conference on Artificial Intelligence and Machine Learning Applications Theme: Healthcare and Internet of Things (AIMLA), Tiruchengode, India, 29–30 April 2025; IEEE: Piscataway, NJ, USA, 2025; pp. 1–4. [Google Scholar]
  10. Yang, E.; Yi, O. Enhancing road safety: Deep learning-based intelligent driver drowsiness detection for advanced driver-assistance systems. Electronics 2024, 13, 708. [Google Scholar] [CrossRef]
  11. Jarndal, A.; Tawfik, H.; Siam, A.I.; Alsyouf, I.; Cheaitou, A. A real-time vision transformers-based system for enhanced driver drowsiness detection and vehicle safety. IEEE Access 2024, 13, 1790–1803. [Google Scholar] [CrossRef]
  12. Doudou, M.; Bouabdallah, A.; Berge-Cherfaoui, V. Driver drowsiness measurement technologies: Current research, market solutions, and challenges. Int. J. Intell. Transp. Syst. Res. 2020, 18, 297–319. [Google Scholar] [CrossRef]
  13. El-Nabi, S.A.; El-Shafai, W.; El-Rabaie, E.S.M.; Ramadan, K.F.; Abd El-Samie, F.E.; Mohsen, S. Machine learning and deep learning techniques for driver fatigue and drowsiness detection: A review. Multimed. Tools Appl. 2024, 83, 9441–9477. [Google Scholar] [CrossRef]
  14. Lacherre, J.; Castillo-Sequera, J.L.; Mauricio, D. Factors, prediction, and explainability of vehicle accident risk due to driving behavior through machine learning: A systematic literature review, 2013–2023. Computation 2024, 12, 131. [Google Scholar] [CrossRef]
  15. Wang, D.; Pei, X.; Li, L.; Yao, D. Risky driver recognition based on vehicle speed time series. IEEE Trans. Hum.-Mach. Syst. 2017, 48, 63–71. [Google Scholar] [CrossRef]
  16. Dehzangi, O.; Masilamani, S. Unobtrusive driver drowsiness prediction using driving behavior from vehicular sensors. In Proceedings of the 2018 24th International Conference on Pattern Recognition (ICPR), Beijing, China, 20–24 August 2018; pp. 3598–3603. [Google Scholar]
  17. Arefnezhad, S.; Samiee, S.; Eichberger, A.; Nahvi, A. Driver drowsiness detection based on steering wheel data applying adaptive neuro-fuzzy feature selection. Sensors 2019, 19, 943. [Google Scholar] [CrossRef]
  18. Shahverdy, M.; Fathy, M.; Berangi, R.; Sabokrou, M. Driver behavior detection and classification using deep convolutional neural networks. Expert Syst. Appl. 2020, 149, 113240. [Google Scholar] [CrossRef]
  19. Jiao, Y.; Deng, Y.; Luo, Y.; Lu, B.L. Driver sleepiness detection from EEG and EOG signals using GAN and LSTM networks. Neurocomputing 2020, 408, 100–111. [Google Scholar] [CrossRef]
  20. Ma, Y.; Chen, B.; Li, R.; Wang, C.; Wang, J.; She, Q.; Luo, Z.; Zhang, Y. Driving fatigue detection from EEG using a modified PCANet method. Comput. Intell. Neurosci. 2019, 2019, 4721863. [Google Scholar] [CrossRef]
  21. Luo, H.; Qiu, T.; Liu, C.; Huang, P. Research on fatigue driving detection using forehead EEG based on adaptive multi-scale entropy. Biomed. Signal Process. Control 2019, 51, 50–58. [Google Scholar] [CrossRef]
  22. Budak, U.; Bajaj, V.; Akbulut, Y.; Atila, O.; Sengur, A. An effective hybrid model for EEG-based drowsiness detection. IEEE Sens. J. 2019, 19, 7624–7631. [Google Scholar] [CrossRef]
  23. de Naurois, C.J.; Bourdin, C.; Stratulat, A.; Diaz, E.; Vercher, J.L. Detection and prediction of driver drowsiness using artificial neural network models. Accid. Anal. Prev. 2019, 126, 95–104. [Google Scholar] [CrossRef]
  24. Zhang, X.; Wang, X.; Yang, X.; Xu, C.; Zhu, X.; Wei, J. Driver drowsiness detection using mixed-effect ordered logit model considering time cumulative effect. Anal. Methods Accid. Res. 2020, 26, 100114. [Google Scholar] [CrossRef]
  25. Wang, J.; Cai, M.; Zhu, Z.; Ding, H.; Yi, J.; Du, A. VTD: Visual and Tactile Database for Driver State and Behavior Perception. arXiv 2024, arXiv:2412.04888. [Google Scholar] [CrossRef]
  26. Bouaziz, B. Drowsiness Detection Dataset. 2020. Available online: https://github.com/bassem-bouaziz/Drowsiness_Detection (accessed on 7 January 2023).
  27. Cramer, J.S. The Origins of Logistic Regression; Tinbergen Institute: Amsterdam/Rotterdam, The Netherlands, 2002; pp. 167–178. [Google Scholar]
  28. Yan, L.; Huang, Z.; Zhang, Y.; Zhang, L.; Zhu, D.; Ran, B. Driving risk status prediction using Bayesian networks and logistic regression. IET Intell. Transp. Syst. 2017, 11, 431–439. [Google Scholar] [CrossRef]
  29. Murata, A. Proposal of a method to predict subjective rating on drowsiness using physiological and behavioral measures. IIE Trans. Occup. Ergon. Hum. Factors 2016, 4, 128–140. [Google Scholar] [CrossRef]
  30. Parmar, A.; Katariya, R.; Patel, V. A review on random forest: An ensemble classifier. In Proceedings of the International Conference on Intelligent Data Communication Technologies and Internet of Things; Springer: Cham, Switzerland, 2018; pp. 758–763. [Google Scholar]
  31. Gwak, J.; Hirao, A.; Shino, M. An investigation of early detection of driver drowsiness using ensemble machine learning based on hybrid sensing. Appl. Sci. 2020, 10, 2890. [Google Scholar] [CrossRef]
  32. Tao, Q.; Zhang, R.; Yan, Y.; Zhang, C.; Li, Z. Improvement of random forest cascade regression algorithm and its application in fatigue detection. In Proceedings of the 2019 IEEE 2nd International Conference on Electronics Technology (ICET), Chengdu, China, 10–13 May 2019; pp. 499–503. [Google Scholar]
  33. Charbuty, B.; Abdulazeez, A. Classification based on decision tree algorithm for machine learning. J. Appl. Sci. Technol. Trends 2021, 2, 20–28. [Google Scholar] [CrossRef]
  34. Hu, J.; Min, J. Automated detection of driver fatigue based on EEG signals using gradient boosting decision tree model. Cogn. Neurodynamics 2018, 12, 431–440. [Google Scholar] [CrossRef]
  35. Yimyam, W.; Ketcham, M. The System for Driver Fatigue Monitoring Using Decision Tree via Wireless Sensor Network for Intelligent Transport System. Int. J. Online Eng. 2018, 14, 21–39. [Google Scholar] [CrossRef]
  36. Yao, Y.; Zhao, X.; Du, H.; Zhang, Y.; Zhang, G.; Rong, J. Classification of fatigued and drunk driving based on decision tree methods: A simulator study. Int. J. Environ. Res. Public Health 2019, 16, 1935. [Google Scholar] [CrossRef]
  37. Hand, D.J.; Yu, K. Idiot’s Bayes—Not so stupid after all? Int. Stat. Rev. 2001, 69, 385–398. [Google Scholar]
  38. Bakheet, S.; Al-Hamadi, A. A Framework for Instantaneous Driver Drowsiness Detection Based on Improved HOG Features and Naïve Bayesian Classification. Brain Sci. 2021, 11, 240. [Google Scholar] [CrossRef]
  39. Nsaif, A.K.; Ali, S.H.M.; Jassim, K.N.; Nseaf, A.K.; Sulaiman, R.; Al-Qaraghuli, A.; Wahdan, O.; Nayan, N.A. FRCNN-GNB: Cascade Faster R-CNN With Gabor Filters and Naïve Bayes for Enhanced Eye Detection. IEEE Access 2021, 9, 15708–15719. [Google Scholar] [CrossRef]
  40. Abu Alfeilat, H.A.; Hassanat, A.B.; Lasassmeh, O.; Tarawneh, A.S.; Alhasanat, M.B.; Eyal Salman, H.S.; Prasath, V.S. Effects of distance measure choice on k-nearest neighbor classifier performance: A review. Big Data 2019, 7, 221–248. [Google Scholar] [CrossRef] [PubMed]
  41. Li, Z.; Zhang, Q.; Zhao, X. Performance analysis of K-nearest neighbor, support vector machine, and artificial neural network classifiers for driver drowsiness detection with different road geometries. Int. J. Distrib. Sens. Netw. 2017, 13, 1550147717733391. [Google Scholar] [CrossRef]
  42. Ekaputri, C.; Fu’adah, Y.N.; Pratiwi, N.K.C.; Rizal, A.; Sularso, A.N. Drowsiness Detection Based on EEG Signal Using Discrete Wavelet Transform (DWT) and K-Nearest Neighbors (K-NN) Methods. In Proceedings of the 1st International Conference on Electronics, Biomedical Engineering, and Health Informatics; Springer: Singapore, 2021; pp. 487–498. [Google Scholar]
  43. Hemalatha, K.; Rani, K.U. Advancements in multi-layer perceptron training to improve classification accuracy. Int. J. Recent Innov. Trends Comput. Commun. 2017, 5, 353–357. [Google Scholar]
  44. Chou, C.L.; Huang, Y.H.; Ho, S.C. Blink Detection Using Facial Landmark Blink Detector and Multi-Layer Perceptron. In Proceedings of the NCS 2019, Huntsville, AL, USA, 4–6 June 2019; pp. 542–545. [Google Scholar]
  45. Zou, B.; Shen, M.; Li, X.; Zheng, Y.; Zhang, L. EEG-based driving fatigue detection during operating the steering wheel data section. In Proceedings of the 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, QC, Canada, 20–24 July 2020; pp. 248–251. [Google Scholar]
  46. Guo, K.; He, L.; Chen, Y.; Guo, W.; Zheng, J. A local community detection algorithm based on internal force between nodes. Appl. Intell. 2020, 50, 328–340. [Google Scholar] [CrossRef]
  47. Diana, N.E.; Ulfa, I.H. Measuring Performance of N-Gram and Jaccard-Similarity Metrics in Document Plagiarism Application. J. Physics Conf. Ser. 2019, 1196, 012069. [Google Scholar] [CrossRef]
  48. Li, B.; Gao, M.; Ma, L.; Liang, Y.; Chen, G. Web application-layer DDoS attack detection based on generalized Jaccard similarity and information entropy. In Proceedings of the International Conference on Artificial Intelligence and Security; Springer: Cham, Switzerland, 2019; pp. 576–585. [Google Scholar]
  49. Moodley, R.; Chiclana, F.; Caraffini, F.; Carter, J. Application of uninorms to market basket analysis. Int. J. Intell. Syst. 2019, 34, 39–49. [Google Scholar] [CrossRef]
Figure 1. Flowchart of RDDF design.
Figure 1. Flowchart of RDDF design.
Wevj 16 00620 g001
Figure 2. VTD simulator [25].
Figure 2. VTD simulator [25].
Wevj 16 00620 g002
Table 1. Pairwise Pearson correlation coefficients among sensor indicators.
Table 1. Pairwise Pearson correlation coefficients among sensor indicators.
SWAPPVSTAVEEG
SWA1.000.320.270.180.21
PP0.321.000.350.420.29
VS0.270.351.000.440.26
TAV0.180.420.441.000.19
EEG0.210.290.260.191.00
Table 2. Performance evaluation of RDDF.
Table 2. Performance evaluation of RDDF.
SWAPPVSTAV{SWA, PP, VS, TAV}EEG
Acc.Pre.Rec.F1Acc.Pre.Rec.F1Acc.Pre.Rec.F1Acc.Pre.Rec.F1Acc.Pre.Rec.F1Acc.Pre.Rec.F1
T = 2 sLR0.940.880.080.140.910.50.0070.010.9610.010.030.980.630.210.310.940.760.170.280.570.60.60.6
RF0.990.990.980.980.910.370.040.070.960.330.010.030.980.660.310.420.990.940.970.960.660.70.650.67
DT0.990.960.980.970.840.170.170.170.920.080.090.090.980.950.430.570.990.930.980.950.630.650.620.63
NB0.940.5410.70.690.060.170.090.720.060.40.10.980.550.230.320.940.5510.710.530.530.890.67
KNN0.980.930.920.920.890.440.360.390.960.510.250.330.980.660.30.420.960.810.650.720.590.620.60.61
MLP0.990.970.890.930.90.330.020.030.96-0-0.980.360.240.350.930.500.010.530.60.40.48
JKNN0.990.9710.980.990.9810.990.990.8110.90.980.9510.970.980.8110.890.990.9410.97
T = 3 sLR0.950.840.180.30.93-0-0.960.250.020.050.990.60.480.540.950.760.160.270.520.530.60.56
RF0.980.910.880.890.920.330.010.020.950.50.020.040.970.610.270.380.980.90.870.880.650.690.620.65
DT0.980.920.90.910.870.150.140.140.940.050.060.060.980.910.390.550.990.860.960.90.590.620.580.6
NB0.930.5210.680.430.050.50.090.740.050.440.090.980.530.230.320.940.5610.720.530.530.880.66
KNN0.980.890.90.890.90.360.250.290.940.430.220.290.980.630.30.410.960.720.580.640.610.610.660.64
MLP0.990.920.910.920.930.20.010.020.96-0-0.980.60.240.350.93-0-0.460.50.130.21
JKNN0.990.9110.950.990.910.950.990.810.880.990.8910.940.990.810.880.980.9210.96
T = 4 sLR0.950.750.190.30.91-0-0.960.330.030.060.980.530.50.510.940.830.240.380.60.620.60.61
RF0.980.910.80.850.930.50.030.060.970.50.090.150.960.610.250.360.980.920.810.860.650.70.630.66
DT0.990.950.870.910.860.120.120.120.940.060.10.070.980.940.380.540.990.90.950.930.590.620.550.58
NB0.920.4910.660.710.060.250.10.70.030.230.050.960.50.230.320.930.4610.630.50.510.880.65
KNN0.980.840.770.810.910.460.270.340.950.280.180.220.980.60.250.290.960.790.410.540.610.640.690.66
MLP0.980.830.850.840.910.250.040.080.96-0-0.970.540.230.320.950.630.630.450.520.540.680.6
JKNN0.980.8610.920.990.8510.910.980.7310.840.990.5510.710.980.5510.710.980.910.95
Table 3. Average training time (seconds) for each classifier and window length.
Table 3. Average training time (seconds) for each classifier and window length.
ClassifierT = 2 sT = 3 sT = 4 s
Logistic Regression (LR)2.94.26.0
Decision Tree (DT)0.81.11.6
Random Forest (RF)8.712.617.8
Naïve Bayes (Gaussian NB)0.60.91.3
K-Nearest Neighbors (KNN, K = 5)0.20.30.5
Multi-Layer Perceptron (MLP, 500/250/40 neurons)68.395.4132.1
Jaccard-KNN (JKNN, K = 5)27.038.252.4
Table 4. Analytical comparison between RDDF and state-of-the-art techniques.
Table 4. Analytical comparison between RDDF and state-of-the-art techniques.
ReferenceYearTechniqueMonitored BehaviorMeasuresAccuracy
Wang et al. [15]2017SVMDrivingVS 95 %
Dehzangi et al. [16]2018DT + EnsembleDrivingAcceleration, Braking, SWM 99.10 %
Arefnezhad et al. [17]2019Fuzzy inference + SVMDrivingSWM 98.12 %
Ma et al. [20]2019PCANet + SVM + KNNDriverEEG 95 %
Luo et al. [21]2019ASF + EntropyDriverEEG 95.37 %
Budak et al. [22]2019LSTMDriverEEG 94.31 %
De Naurois et al. [23]2019CNNDriving and DriverHeart rate, head movement, EM, VLD, VS, SWM 95 %
Shahverdy et al. [18]2020CNNDrivingGravity, VS, throttle, acceleration 99.99 %
Jiao et al. [19]2020WT + LSTMDriverEEG, EOG 98 %
Zhang et al. [24]2020Logit functionDriving and DriverVLD, EM 62.84 %
This work2025RDDFDriving and DriverSWA, PP, VS, TAV, EEG 99.8 %
Table 5. Empirical comparison between RDDF and state-of-the-art techniques.
Table 5. Empirical comparison between RDDF and state-of-the-art techniques.
ReferenceAccuracy (%)Precision (%)Recall (%)F1-Score (%)
De Naurois et al. [23]92.0 ± 0.991.5 ± 0.690.8 ± 0.791.1 ± 0.6
Shahverdy et al. [18]90.5 ± 1.190.0 ± 1.0689.7 ± 0.9789.9 ± 0.99
RDDF95.8 ± 0.4295.4 ± 0.5795.1 ± 0.6195.2 ± 0.58
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Harb, H. An Efficient Drowsiness Detection Framework for Improving Driver Safety Through Supervised Learning Models. World Electr. Veh. J. 2025, 16, 620. https://doi.org/10.3390/wevj16110620

AMA Style

Harb H. An Efficient Drowsiness Detection Framework for Improving Driver Safety Through Supervised Learning Models. World Electric Vehicle Journal. 2025; 16(11):620. https://doi.org/10.3390/wevj16110620

Chicago/Turabian Style

Harb, Hassan. 2025. "An Efficient Drowsiness Detection Framework for Improving Driver Safety Through Supervised Learning Models" World Electric Vehicle Journal 16, no. 11: 620. https://doi.org/10.3390/wevj16110620

APA Style

Harb, H. (2025). An Efficient Drowsiness Detection Framework for Improving Driver Safety Through Supervised Learning Models. World Electric Vehicle Journal, 16(11), 620. https://doi.org/10.3390/wevj16110620

Article Metrics

Back to TopTop