<jupyter_start><jupyter_text>Applications on multiple traces<jupyter_code>import sys
sys.path.append("../../src")
%reload_ext autoreload
%autoreload 2
from theory202104 import *
from helpers import graph<jupyter_output><empty_output><jupyter_text>Let be $L=\{ T_i \ | i=1 ... N\}$ a set of $N$ traces in the alphabet $\Sigma$.*Intuition*: $$\forall e=ab \in \Sigma^2 \\\eta_L(e) = \sum_{ T_i \in L } { \eta_{T_i}(e) } $$<jupyter_code>T1 = 'abc'
Gp1 = pair_graph(T1)
print(Gp1.pd)
print('Sequences: {}'.format( sequences_from_pair_graph( Gp1 )))
graph(Gp1)
T2 = 'abd'
Gp2 = pair_graph(T2)
print(Gp2.pd)
print('Sequences: {}'.format( sequences_from_pair_graph( Gp2 )))
Gp = Gp1 + Gp2
graph( Gp )
sequences_from_pair_graph( Gp )<jupyter_output><empty_output><jupyter_text>Some examples<jupyter_code>def sequences_from_log( L ):
    Gp = pair_graph('')
    for Ti in L:
        Gp = Gp + pair_graph(Ti)
    return sequences_from_pair_graph( Gp )
Pg = pair_graph('')
sequences_from_pair_graph( Pg )
T1 = 'abababababab'; T2 = 'ba'
sequences_from_pair_graph( pair_graph(T1) + pair_graph(T2) )
L=['abc', 'XY', 'abXYcaXbcY']
sequences_from_log(L)
L=['abcde', 'abcXY', '123abc']
sequences_from_log(L)
# Single path ABC 1234 qwxyz noise(sfd)
L = [
    list("AsBC123q41234AwBdCABCxy1234f1234AsBzCABdC123412s34ABCAfBC123d41234ABC"),
    list(""),
    list("qw1xABC23yz41qwxyz2A3B4CAq1B23w4Cx12Ay3B4CzAsBfC1q2f34123d4AwBdCABC1234f1234ABCABxyzdC123412s34ABCABC123d412f34ABfC"),
    list(""),
    list("")
]
sequences_from_log(L)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1510045366169799, 'fraction_numerical': 0.07323395981853532, 'mean_word_length': 6.148148148148148, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '193215', 'license': 'Apache-2.0', 'n_tokens_mistral': 755, 'n_tokens_neox': 674, 'n_words': 115, 'path': 'notebooks/2021-refactor/2021-04-25 Applications on multiple traces.ipynb', 'repo_name': 'jpgil/logdelay', 'size': '1543'}