2. Interpretation Models for Unidimensional Descriptions. Sequence Repetition Model
Consider text
formed by a series of
elementary characters
; each referred to according to their position
in
. Then, the text
can be expressed as the following concatenation of
characters:
We define the interpretation process, or simply the interpretation, as the criteria to form groups of characters that reduce
's complexity. The interpretations inspect text
for sequences of characters that appear
or more times. The term 'symbol' refers to these characters' sequences. Nevertheless, sometimes, we use the term 'sequence' to recall the symbols, which are, within the scope of this document, strings of neighbor characters. After submitting a text
to any process capable of retrieving the repeated char sequences or symbols, we may represent the resulting set
of symbols, with their corresponding frequencies of occurrence
, as:
Notice that the series of symbols and frequencies start at index . That means the number of repeated symbols is . Equivalently, the symbolic diversity of is .
When interpreting text
at its maximum scale, sub-contexts are not considered, thus, there must not be overlapping positions occupied by any two symbols. Consequently, symbols
must not share any char position. Interpretations of text
may differ when diverse criteria are used to select, within the text, the sets of contiguous characters to form a set of symbols
. Based on the observer’s choice—or the choice implied by the observer’s criteria—, a symbol
starting at the text-position
, and made of
characters is
Additionally, all chars contained in are not necessarily part of a symbol in the set . The chars not included in any are noise concerning the interpretation. This consideration is consistent with the typical existence of not synthetized fragments in any system’s description. However, the standard objective of any description is to minimize the noise fraction.
For long texts and time series, the symbol diversity may be significant. In these cases, reducing the complexity of the system’s representation is convenient to make it feasible and controllable for a quantitative analysis. To cope with this, we propose working with the set of symbols grouped by their length. Therefore, we define
as the set of all repeated sequences
sharing the length
. Correspondingly, let
be the number of appearances of each symbol category
. Thus, the tendency of a process to repeat sequences of values according to their lengths can be characterized by the spectrogram
, which we defined as
where
and
are the length and the frequency of the longest repeating sequence within text
.
The frequencies
are linearly related to the fraction of text
occupied by symbols of each length category. Then, by convenience, we alternatively express the characteristic spectrogram
in terms of the probability of encountering a
-long sequence within text
.
We refer to the spectrograms and as the frequency-based and probability-based Interpretations. We use the term Representation to refer to the selections of char-sequences to form sets of symbols and obtaing after some Interpretations
2.1. Probability Model of the One-Scan Repeated Sequence Length (OSRSL)
We aim to build a probability model of the repetitions of sequences of similar values in a series. In this context, similar values refer to data elements sharing the same category in a discrete quantitative scale. When the original data is a series of scalar numbers, a meticulous discretization step converts the values into a text formed with an alphabet of as many letters as the resolution of the discretizing process requests. This precise process identifies repeating sequences within the text , and as a result, and are the lengths and the frequency of the most extended repeating sequence. From our perspective, such a probability model would be an interesting tool for extracting information on the process values, creating a “fingerprint” of the process behavior, and facilitating a deeper understanding of the process.
We expect to deal with complex processes that usually are oscillatory but non-periodic series of values. The Discrete Fourier Transform (DFT) algorithm is the classical tool to study oscillatory processes. However, the DFT is not well suited for low frequency and non-periodic processes [
6], and its complexity [
7] may represent a barrier with series in the order of thousands of values. Our approach to achieving this objective is to build the probability distribution of char-sequences—or symbols, as we have defined them—that repeatedly appear in a text. The aleatory variable is not the sequence but the repeated sequences’ length measured in the number of chars. Inspecting the text to locate the most extended repeat sequence and then using the results to compute the probability associated with each sequence length is time-consuming. That procedure would require running
times the Repeated sEquence eXtractor (REX) algorithm—explained later in this paper—to determine all elements on the right side of Definition (5). Thus, we first focus on answering these questions: Having a text
, which length is
, and what is the most extended sequence that appears
or more times in a text? How long is the sequence? Once this step is accomplished, the found repeated sequences are isolated from
, leaving the text
, whose shorter length
, remains to be analyzed in further steps with an overall convenient algorithmic complexity reduction.
We start with a
-character long text
, formed by
different chars distributed along the text. By locating the most extended no-overlapping sequence appearing
times in text
, we empirically compute the probability of
containing an
-long sequence that repeats
times. At this point, we introduce the syntax
to refer to the likelihood of a
-long sequence appearing exactly
times in the text
. After scanning the text and identifying the
-times repeating sequences, we write:
Following the computation of the probability
, the search for repeated sequences continues with the remaining text of length
. Identifying the length
of the most extended repeated sequences at each search step
leads to determining the probability referred to the length of the remaining text corresponding to the step
. Thus,
After applying the algorithm REX and identifying the most extended repeated sequences for , , , and successively using Equation (7), intermediate probability results are obtained. The values of probabilities exhibit an attractive distribution that is convenient to discuss here. Note the remaining text fraction reduces every time REX isolates the found sequences until no more repeated sequences are found. The final remaining text not represented by any repeated sequence is an expression of noise contained in the original text .
Figure 1 (Left) shows the origin of the ramp-shaped probabilities
.
Figure 1 (Right) is an actual graph showing the interpretation of results
.
The probability distribution of the One-Scan Repeated Sequence Length (OSRSL) retrieves a set of character sequences that appear in such frequencies that they minimize the symbol frequency-based text description; therefore, a relatively low entropy description is reasonable to expect. Since this condition implies interpreting the text to maximize extracted information, we regard this resulting set of symbols as a scale of observation. It is worth mentioning that the OSRSL determines this observation scale by locating sequences from the longest to shortest ones, contrasting the procedure followed to determine the so-called Fundamental Scale [
8], which searches for repetitive sequences starting from the shortest to the longest one.
The OSRSL characterizes the process by modeling it through the first-scan interpretations and defined in (4) and (5). However, these interpretations are only a top-scale characterization of . Successively repeating the process on each sequence is performed to obtain a nested sequence-length characterization of the text, as is presented in the section below. On the other hand, by comparing with the first OSRSL scan offers a measure of the noise integrating interpretations and .
2.2. Nested Repeated Sequence Length Decomposition (NRSLD)
Looking for symbols repeated within another symbol, as in a nested fashion, would alter the scope of the observer’s view. Considering ‘nested contexts’ is needed to assess the complexity of a system integrating all possible scales of observation. In this section, we explain a procedure to obtain these sets of sequences, which we name the Nested Repeated Sequence Length Decomposition (NRSLD). By studying the NRSLD associated with a process text, we expect to characterize the process. However, decomposing a long text in the repeated sequences on their length is a highly long computational operation. Without a pre-established sequence repetition pattern, the text must be scanned an enormous number of times while accounting for the number of each character-sequence that appears repeatedly in the text. Consequently, we look for a scanning criterion to constrain the scanning branches through the text and lead the procedure to a feasible condition.
In a former section, we presented the OSRSL, a procedure conceived to retrieve the most extended character sequence that appears at least times. After blocking the sequences found, the remaining text is subject to inspection to retrieve the following most extended sequence that appears times. The search for repeated sequences continues until the remnant text does not contain repeated sequences of two or more characters. The OSRSL is a valid characterization; however, since every found sequence is isolated from the search space, the OSRSL does not account for the number of times shorter sequences appear contained in a longer sequence. Thus, the OSRSL does not directly capture the potential characteristic behavior. A way to accomplish our goal of building a probability distribution expressing the fractions occupied by repeated sequences in the full range of the text is to complement the distribution represented by OSRSL with appearances of the short sequences that may be within the longer—previously blocked—sequences. This strategy, fully explained in the section below, leads to the Nested Repeated Sequence Length Decomposition (NRSLD). The NRSLD not only expresses the tendency of the text-represented process to repeat state sequences but also offers a characterization of the system structure by showing how deep a sequence is nested within more extensive char sequences.
The syntax refers to the probability of an -long sequence appearing exactly times in the text . The sub-index denotes the specific sequence. To compute the likelihood , we account for the sequences nested into longer repeated sequences that function as text containers. The account starts from the repeated sequences encountered by the OSRSL: the probabilities . The found sequences are isolated from , and the remnant text is subject to a similar search for repeated sequences; this procedure segment repeats until the remnant text is not long enough to contain repetitive sequences.
At the end of this initial stage, we see text
at its maximum scale. We conduct the text observation scope using its depth
. The observation depth
determines the text description—and, therefore, the process
represents—through the set of the repeated sequences found in
. Consistent with the scale concept proposed by Febres [
9], the text
broadest observation scale description is the set of repeating sequences found at the nesting depth
. After completing this stage, the procedure follows similar steps, accounting for the sequences that appear nested at one additional level within the more extensive sequences. We call the structure resulting from this procedure The Nested Decomposition. The repeated sequences detected at each inspection depth constitute the set of sequences corresponding to more detailed observation scales. The text fraction that a repeated sequence occupies grows with
, the sequence’s
length, and
, the number of times it appears in the text. Therefore, we determine the NRSLD elements—the
values—by adding the probability OSRLS of appearances of shorter sequences nested in the longer sequence; the
value tends to increase proportionally to the product
. Thus, we write
. However, since
and
grow in opposite directions, we do not expect
to increase or diminish indefinitely. Nevertheless, since shorter sequences may appear nested at several depths in longer sequences,
values are expected to differ by several orders of magnitude as their length varies, thus making our selection to represent the NRSLD as a log-log diagram.
The NRSLD graphically describes the tendency of a process to repeat strings of states—namely sequences—. Graphically expressing how these strings nest into longer ones requires adding attributes, like colors or transparencies, to the bubbles representing sequences, a promising and fascinating graphic objective we may further develop in a later paper. In this document, we explore two graphic representations of the NRSLD:
MSIR: Multiscale Integral representation. It comprises the sets of symbols sharing their length and disregarding the nesting depth they appear at.
NPR: Nested Pattern representation. It regards the symbols’ nesting depth within the tree structure.
Figure 2 illustrates two representations of repeated sequences' probability decomposition according to length.
Figure 2 (Left) shows bands where the results of the NRSLD are expected to lie for a 10000-char-long text.
Figure 2 (Center) shows the MS representation of an actual NRSLD performed over a 10000-char-long text. Each triangular bubble represents the set of all repeated sequences of the same length; there may be several different sequences in a sequence, but all sequences in a set share the same length, represented in the horizontal axis. The vertical axis shows the fraction of space occupied by the same length sequence set. Note that these sequences belong to a same-length set independent of how nested each sequence appears within longer sequences, which explains why the summation of space filled by sequences adds up to more than one. In
Figure 2 (Center), therefore, the vertical dimension represents the probability of encountering a sequence of the length signaled in the horizontal axis within the text; the MSIR.
Figure 2 (Right) shows the unfolding of the NRSLD and the same-length sequences into sets sharing the same nesting depth; the NPR. Large bubbles correspond to the shallowest nesting depth, while progressively smaller bubbles indicate smaller and deeper nesting symbols appearing in the text as components of more extensive sequences.