## 4 Experimental Analysis
### Analysis of Results  
As seen in the previous section and as might be evident, reducing the log size significantly improves its processing. When evaluating how similar the original and processed logs are using hierarchical classification, we focus on creating a similarity matrix between the lines of each analyzed set, both original and processed, and between them. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Log** & **Total Lines** & **Tokenized Time** & **Modelized Time** & **Mean Batch Time** \\ \hline HDFS\_2k & 2000 & 0.8816 & 54.0701 & 0.2156 \\ HDFS\_2k\_HC & 16 & 0.2109 & 0.5704 & 0.2842 \\ HDFS\_20M & 149,477 & 50.0624 & 4039.0378 & 0.2155 \\ HDFS\_20M\_HC & 22 & 0.2086 & 0.8397 & 0.2791 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Processing times per line. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Log** & **Total Lines** & **Tokens Count** & \
\begin{tabular}{c} **Tokens Mean** \\ **Batch** \\ \end{tabular} &
\begin{tabular}{c} **Tokens Std** \\ **Batch** \\ \end{tabular} \\ \hline HDFS\_2k & 2000 & 152,960 & 611 & 234 \\ HDFS\_2k\_HC & 16 & 1344 & 672 & 16 \\ HDFS\_20M & 149,477 & 11,043,195 & 591 & 54 \\ HDFS\_20M\_HC & 22 & 1944 & 648 & 28 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Tokens per line. Figure 8 shows two heatmaps of similarity matrices for HDFS log records. In the graph on the left, the matrix for the \"HDFS_2k vs. HDFS_2k\" dataset shows uniformity in color, suggesting high similarity between the log lines, implying little variation between them, as expected in unprocessed log records where repetitive messages are common. On the other hand, the graph on the right shows the matrix \"HDFS_2k_HC vs. HDFS_2k_HC\" corresponding to a processed dataset of high cardinality. The more varied colors in this matrix indicate more significant differences in similarity between the log lines, suggesting that processing has highlighted or preserved the most unique lines or anomalies, leading to greater diversity in the log content. The presence of dark red blocks indicates pairs of lines with high similarity, while lighter colors represent lower similarity. This reflects the typical purpose of a high-cardinality process, which is to identify and isolate the less frequent or more distinct events within a large dataset. Figure 9 presents a heatmap showing a range of similarities between the lines of the original \"HDFS_2k\" dataset and its processed version \"HDFS_2k_HC\". The dominant red tones indicate high similarity, while blue represents lower similarity. The predominance of red throughout the map suggests that despite the processing, there is notable consistency or significant similarity between the corresponding lines of both logs. The lack of distinct blue blocks also indicates that there are no lines between the datasets that are entirely different. The processing aimed to preserve essential information while reducing redundancy; this heatmap suggests that a considerable degree of the original information has been retained in the processed version. Figure 8: Internal similarity of original and processed log. Figure 9: Similarity between the original and processed log. To further compare the similarity between the original and processed log, we used the cosine similarity function from the PyTorch deep learning library to calculate the similarity between two sets of embeddings. The torch.nn.functional _cosine_similarity function calculates the cosine similarity between two tensors, which in this context are embeddings corresponding to the two tokenized log files. Cosine similarity measures the cosine of the angle between two vectors in a multidimensional space, providing an indicator of their relative orientation but not their magnitude. Cosine similarity between two vectors is calculated using the following formula:  
\[\text{cosine similarity}(A,B)=\frac{A\cdot B}{\|A\|\|B\|}\]  
In the case of vectors with only positive components, as is common in text representations and many other applications, the cosine similarity will be between 0 and 1.