# Outlier Detection for Multivariate Time Series Using Dynamic Bayesian Networks
## 4 Experimental Results
### Simulated Data
#### 4.1.4 Comparison with Probabilistic Suffix Trees  
To contrast the proposed system, an additional outlier detection mechanism is studied. The latter adopts probabilistic suffix trees (PST) [41], variable length Markovian techniques, with the aim of mining abnormal values in MTS. These structures are only capable of modeling univariate data, perceiving a discrete TS as a sequence of symbols \(\mathbf{S}^{i}=(s^{i}_{1},\ldots,s^{i}_{T})\). The temporal component is encoded in the position of each symbol, which assumes a value from the discrete set \(\mathcal{X}_{i}\).  
To tackle MTS, datasets are divided into multiple sets, each one containing data concerning one variable. Every set is used to model a PST \(P^{i}\). Subjects are seen as sets of sequences \(\mathbf{S}^{i}\) for each variable \(1\leq i\leq n\) associated to its corresponding PST. Thus, subjects with five variables are modeled using five independent trees. Each PST \(P^{i}\) computes an univariate score \(logloss(\mathbf{S}^{i})\)[42] for all subjects considering its variable, according to  
\[logloss(\mathbf{S}^{i})=\frac{1}{T}\log_{2}P(\mathbf{S}^{i}), \tag{12}\]  
where \(T\) is the maximum length of sequence \(\mathbf{S}^{i}\). The probability of a sequence is computed using the _short-memory_ property as  
\[P(\mathbf{S}^{i})=P(s^{i}_{1})P(s^{i}_{2}|s^{i}_{1})\ldots P(s^{i}_{T}|s^{i}_{1} \ldots s^{i}_{T-1}), \tag{13}\]  
with each state in the sequence, \(s^{i}_{l}\), being conditioned on its past observed states, also known as contexts. The conditional probabilities are retrieved efficiently from a tree structure. Scores, computed using Equation (12) for each PST \(P^{i}\)\(1\leq i\leq n\), concerning every TS from a common subject are stored in an array. The mean of the array is the multivariate score for the subject, being obtained by  
\[\frac{1}{n}\sum_{i=1}^{n}logloss(\mathbf{S}^{i}_{h}), \tag{14}\]  
where \(\mathbf{S}^{i}_{h}\) is the sequence concerning variable \(i\) from subject \(h\in\mathcal{H}\).  
An existing PST modeling software [42] was adapted to a MTS scenario. Each experiment using simulated data is compared with METEOR. Likewise, score-analysis is employed posterior to scoring, selecting one of the two considered strategies. Tests are available in Table 3, being models \(A\), \(B\) and C the same used in Section 4.1. Results demonstrate the low performance of the PST approach when discerning anomalies generated by DBN \(B\). Such is explained by the fact that \(B\) is much similar to the normal model \(A\) when compared with \(C\). Furthermore, since inter-variable relations are not considered, subjects become identical when seen by the PSTs. Hence, the resulting score distributions display a single curve blending both classes. One exception are experiments considering \(5\%\) of anomalies, which indicate that with the increase of outlier ratios, the few dissimilarities among classes are modeled, causing outliers to fit each PST. Additionally, the superior results with model \(C\) can be explained by the its higher discrepancy with the normal model \(A\).  
In Figure 5, a comparison between the METEOR and the PST approaches for a same experiment with 20% of outliers from model \(C\) is shown. The PST system cannot separate both classes as well as the DBN approach, blending normal and anomalous scores. Results demonstrate the importance of the inter-variable relationships present in model \(C\) for outlier disclosure in MTS data, of which the PST technique neglects. Moreover, the PST approach scales poorly with the increase of outlier ratios and never outperforms METEOR in the experiments conducted.