# Anomaly Detection in High-Dimensional Time Series Data with Scaled Bregman Divergence
## 2 Materials and Methods
### Algorithm and Computational Complexity Analysis
#### 2.3.1 Anomaly Detection Algorithm

Table 1: Summary of biomedical datasets. Figure 8: Anomaly detection results in Yahoo Synthetic 11 using the RuLSIF and PLsBD methods with the \(L_{2}\) loss function; the mixing parameter \(\alpha\) is set to be 0.5. The black bars indicate the frequencies that an observation is flagged as an anomaly in 50 runs. Red dashed vertical lines mark the true anomaly indices. results were evaluated using different \(\alpha\) values and loss functions, along with the corresponding computation times. \begin{table}
\begin{tabular}{l l l l l l l} \hline \hline
**Method** & **Loss** & \(\alpha\) & **Diabetes** & **Time (s)** & **Heart** & **Time (s)** \\ \hline uLSIF & L1 & 0 & 0.5246 & 74.28 & 0.4847 & 27.97 \\  & L2 & 0 & 0.5031 & 92.60 & 0.4917 & 32.14 \\ \hline \multirow{6}{*}{RuLSIF} & L1 & 0.01 & 0.5088 & 74.26 & 0.4925 & 24.58 \\  & L1 & 0.10 & 0.5546 & 75.04 & 0.5310 & 24.35 \\  & L1 & 0.50 & 0.5236 & 73.91 & 0.4928 & 24.52 \\  & L1 & 0.90 & 0.5236 & 74.52 & 0.4928 & 24.68 \\ \cline{2-6}  & L2 & 0.01 & 0.5043 & 93.31 & 0.4920 & 31.99 \\  & L2 & 0.10 & 0.5565 & 92.95 & 0.5193 & 31.82 \\  & L2 & 0.50 & 0.5236 & 94.05 & 0.4931 & 32.22 \\  & L2 & 0.90 & 0.5236 & 92.80 & 0.4919 & 32.37 \\ \hline \multirow{6}{*}{PLsBD} & L1 & 0.01 & 0.5107 & 71.33 & 0.5036 & 25.08 \\  & L1 & 0.10 & 0.5520 & 71.25 & 0.5497 & 23.19 \\  & L1 & 0.50 & 0.5236 & 70.94 & 0.4936 & 23.56 \\  & L1 & 0.90 & 0.5236 & 70.13 & 0.4933 & 22.52 \\ \cline{2-6}  & L2 & 0.01 & 0.5037 & 90.47 & 0.4917 & 30.68 \\ \cline{2-6}  & L2 & 0.10 & 0.5580 & 89.70 & 0.5210 & 30.50 \\ \cline{2-6}  & L2 & 0.50 & 0.5236 & 89.81 & 0.4925 & 30.80 \\ \cline{2-6}  & L2 & 0.90 & 0.5236 & 89.55 & 0.4931 & 30.67 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Mean AUC values for the diabetes and heart datasets, evaluated with different \(\alpha\) values and loss functions, including computation time. Figure 9: ROC curves for uLSIF, RuLSIF, and PLsBD methods with \(L_{1}\) and \(L_{2}\) loss functions on the diabetes dataset. Each plot shows results for different mixing parameters \(\alpha\) (\(\alpha\) = 0.01, 0.1, 0.5, 0.9). The results in Table 2 show that the scaled Bregman divergence-based methods PLsBD and RuLSIF outperform uLSIF across all datasets with the same parameter settings, including both \(L_{1}\) and \(L_{2}\) loss functions. Previous studies have indicated that the mixing parameter \(\alpha\) influences the performance of the algorithm. Table 2 confirms that smaller values of \(\alpha\) (e.g., \(\alpha=0.1\)) lead to better performance, with larger AUC scores, while larger values of \(\alpha\) (e.g., \(\alpha=0.9\)) result in decreased performance. For instance, in the diabetes dataset, both RuLSIF and PLsBD achieve the best performance at \(\alpha=0.1\) with AUC values exceeding 0.55 for both \(L_{1}\) and \(L_{2}\) loss functions. When \(\alpha=0.5\) or higher, the AUC value drops to 0.52. In the simulation data analysis (Figures 1-5), the choice of loss function, whether absolute error loss (\(L_{1}\)) or squared error loss (\(L_{2}\)), significantly impacts the performance of anomaly detection when the number of anomalies is small. However, in the benchmark dataset, where at least 20% of the data points are anomalies, the results in Table 2 show that the difference in performance between the two loss functions is minimal. Table 3 presents the results for the thyroid and breast cancer datasets, showing trends consistent with the findings in Table 2.

We also summarize the computation time for each method with different loss functions and varying values of \(\alpha\) in Tables 2 and 3. The results align with the theoretical complexity analysis presented earlier. Specifically, when the loss function is fixed, the computation times across all three anomaly detection methods are comparable. However, methods based on the \(L_{2}\) loss function require significantly more computation time than those using \(L_{1}\) loss.