## 3 Proposed Approach
### Class Weights
#### 3.3.1 Convolutional Neural Networks (CNN)  
The given model architecture integrates CNN and a MLP for both binary and multi-class classification tasks. It begins with an input layer designed to accept sequential data structured as a one-dimensional array. The first CNN block applies a convolutional layer followed by batch normalization, ReLU activation, max pooling, and dropout to extract and regularize features effectively. This process is repeated in subsequent CNN blocks with varying kernel sizes to capture different patterns and features in the data. After the CNN blocks, the flattened output is fed into an MLP block that consists of a dense layer with L2 regularization, batch normalization, ReLU activation, and dropout to enhance the model's representation capabilities while mitigating overfitting. The outputs from the CNN and MLP components are then concatenated to form a comprehensive feature set. Finally, the output layer uses a sigmoid activation function for binary classification, or a softmax activation for multi-class classification, combined with binary cross-entropy or categorical cross-entropy as the loss function, respectively, to optimize model performance based on the specific classification task. The model is compiled using the Adam optimizer, which aids in efficient learning and convergence during training. The convolution operation in the CNN layers plays a crucial role in feature extraction by applying filters to the input data. This operation involves sliding the convolution kernel over the input feature map, computing the dot product at each position to produce a feature map. The mathematical representation of the convolution operation can be defined as shown in Equation (8) [89]. \[Z_{i,j}\!=(X*K)\ _{ij}\!=\sum_{m}\sum_{m}Z_{i+m,j+n}k_{m,n} \tag{8}\]  
In this context, \(Z\) represents the output feature map, while \(X\) denotes the input feature map. The convolution kernel is indicated by \(K\), which is utilized in the convolution operation to transform the input features into the output features. The ReLU activation function, shown in Equation (9) [90], is a simple yet powerful non-linear transformation. It outputs zero for negative inputs, retains positive values, mitigates the vanishing gradient issue, and promotes sparse activations, enhancing both training efficiency and model performance. \[ReLU(x)=max(0,x) \tag{9}\]  
The max pooling operation reduces the spatial dimensions of the input feature map while retaining the most important features. This operation selects the maximum value from a specified pooling window, effectively downsampling the input. The equation for the max pooling operation can be expressed as shown in Equation (10) [89]. \[P_{i,j}=max\big{(}X\ _{i\dot{x}+p,\ j\dot{x}+q}\big{)} \tag{10}\]  
In this context, \(P\) refers to the pooled output generated from the pooling operation, while \(p\) and \(q\) represent the dimensions of the pooling window used to aggregate the input features into the pooled output. The dropout layer randomly sets a fraction \(p\) of input units to zero during training to prevent overfitting. This technique helps to improve the model's generalization by ensuring that it does not rely too heavily on any single input feature, as detailed in Equation (11) [91]. \[Dropout(x)=\left\{ \begin{aligned} & x\ with\ probability\ 1-p\\ & 0\ with\ probability\end{aligned} \right. \tag{11}\]For binary classification tasks, the output layer utilizes the sigmoid function, which outputs a probability score indicating the likelihood of an instance belonging to the positive class. This is mathematically expressed in Equation (12) [92]. \[\sigma\left(Z\right)=\frac{1}{1+e^{-z}} \tag{12}\]  
where \(Z\) is the output from the last dense layer. The output layer employs the softmax function for multi-class classification, allowing the model to produce a probability distribution across multiple classes. This can be mathematically represented as shown in Equation (13) [92].