## 3 Materials and Methods
### Data Augmentation  
#### 3.2.1 Time-Series Data Cleaning and Imputation  
Time-series data, commonly utilized in domains such as finance, healthcare, and IoT, are characterized by sequential recordings of events or measurements over time. However, raw time-series data often suffer from issues such as noise, missing values, and outliers. If left unaddressed, these issues can severely compromise data quality and model performance. To mitigate these challenges, a tailored cleaning and imputation strategy \begin{table}
\begin{tabular}{l c c} \hline \hline
**Dataset Name** & **Quantity** & **Task Type** \\ \hline MNIST & 70,009 & Image Classification \\ USPS & 9298 & Image Classification \\ CelebA & 200,703 & Facial Attribute Prediction and Classification \\ Credit Card Fraud Detection & 284,807 & Financial Fraud Detection \\ IMDb Reviews & 50,379 & Sentiment Classification \\ BreakHis & 7909 & Image Classification (Benign/Malignant) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Summary of datasets used in the study. Figure 1: Image dataset samples. was proposed to enhance data completeness and accuracy, thereby providing high-quality input for subsequent model training. The primary objective of time-series data cleaning is to detect and handle noise and outliers. Assuming a time-series dataset \(\mathbf{X}=\{x_{1},x_{2},\ldots,x_{T}\}\), where \(T\) represents the temporal length and \(x_{t}\) denotes the observation at time \(t\), outlier detection was conducted using a statistical standard deviation-based method, which is a straightforward yet effective approach. The detection rule for outliers is expressed as:  
\[x_{t}\]  
is identified as an outlier if and only if \[|x_{t}-\mu|>\alpha\sigma\] (7)  
where \(\mu\) denotes the time-series data and \(\alpha\) is a hyperparameter typically set to values between 2 and 3 to control sensitivity to outliers. This approach quantifies the deviation of each data point from the mean to identify potential outliers. Detected outliers are subsequently replaced to ensure continuity and consistency within the data. Interpolation methods were utilized for outlier replacement, balancing the preservation of data trends and minimizing model distortion. Among these, linear interpolation is widely used for data with simple trends. The linear interpolation formula is given as:  
\[x_{t}=\frac{x_{t-1}+x_{t+1}}{2}, \tag{8}\]  
where \(x_{t-1}\) and \(x_{t+1}\) represent the observations immediately preceding and following the outlier, respectively. This replacement strategy reduces disruption to the overall data distribution. For more complex data trends, spline interpolation was employed to better fit the underlying patterns and enhance precision. Missing values are another prevalent issue in time-series data. To address this, multiple imputation strategies were designed, considering the stationarity and periodicity of the data. Forward fill is a straightforward method that fills missing values with the last observed value, defined as:  
\[x_{t}=x_{t-1},\quad\text{if $x_{t}$ is missing.} \tag{9}\]  
This method assumes short-term stability in the data, making it suitable for datasets with short-term trends. For data with strong periodicity, such as daily or seasonal patterns, a periodic mean imputation strategy was introduced to leverage historical cyclic patterns. The formula for periodic mean imputation is as follows:  
\[x_{t}=\frac{1}{N}\sum_{i=1}^{N}x_{t-i}.p, \tag{10}\]  
where \(P\) represents the period length and \(N\) is the number of reference cycles. This method assumes stability in periodic characteristics, preserving periodic trends when filling missing values. For scenarios involving significant consecutive missing values, such as sensor failures, multi-variate interpolation and machine learning models were employed to generate more accurate imputed values by exploring latent relationships within the data. In summary, the proposed time-series data cleaning and imputation strategy encompassed noise detection, outlier handling, and missing value imputation.