## 4 Methodology
### Overview of Data Handling and Analysis Strategy  
In this section, we explain the comprehensive process of data manipulation and analysis. This research's main objective is to deepen our understanding of the relation ships between driving-related variables and their impacts on outcomes indicative of situational awareness. The initial investigation used findings from a prior study in [24] with specific attribute thresholds for classifying driving data. However, due to unsatisfactory predictive accuracy (RMSE of 0.4), we conducted a more detailed data examination. This revealed the need for deeper analysis to uncover finer connections between variables. Subsequently, we adopted a comprehensive data processing approach, focusing on normalization and categorization. **The first step** involves applying the **min-max normalization** technique to all inputs. This method is a common technique used in data preprocessing to scale numerical features to a specific range, typically between 0 and 1. Min-max normalization ensures uniform scaling by subtracting the minimum value of the feature from each data point and then dividing it by the range of the feature (the difference between the maximum and minimum values). By applying min-max normalization, we ensured that all inputs were scaled uniformly between 0 and 1. **The second step** in our data analysis process involves **aggregating data by specific attributes** to calculate counts and means for the target variable, situational awareness (SA). This aggregation helps us understand how different categories within a variable correlate with outcomes. We then dissect the normalized data into quantifiable groups or domains based on these attributes, segmenting the data into deciles or other meaningful segments to assess the distribution of SA across them. For instance, the attribute 'age' might be divided into segments such as 22-23, 24-25, and so on, with each segment evaluated for its statistical distribution regarding SA. This step is crucial for determining the influence each age group has on outcomes, which aids in constructing models based on fuzzy logic or machine learning. Our primary concern with SA is **classifying it into three levels**: _'low'_ (SA less than 0.3) indicating the driver's inability to control the vehicle; _'middle'_ (SA between 0.3 and 0.6) suggesting the driver can take control but may need more time; and _'high'_ (SA over 0.6) where the driver is ready to take immediate control. Our goal is to categorize the driver's SA into these groups effectively. To establish meaningful categories from continuous or semi-continuous data, we use a function that divides the data into predefined or quantitatively determined segments. This division can be achieved through:  
* **Equal-width binning**: Dividing the range of an attribute into bins of equal size, such as segmenting 'age' into 21-30, 31-40, etc. * **Quantile-based binning**: Dividing the data into quantiles using the 'pd.qcut' function, ensuring each bin contains roughly the same number of data points. This method is particularly useful for handling skewed distributions. Once segmented, we analyze the distribution of the target variable 'Y' within these segments. We calculate the percentage of data falling into predefined categories (_'low'_, _'medium'_, and _'high'_) based on the value of SA. **This categorization helps identify how different segments influence the target outcome**, informing the weighting factors in predictive modeling. Consider a practical application of this method with the attribute _'drivingFrequency'_. The data is segmented into groups, and for each group, the proportions of _'low'_, _'middle'_, and _'high'_ SA values are calculated.