Mint: MDL-based approach for Mining INTeresting Numerical Pattern Sets

Pattern mining is well established in data mining research, especially for mining binary datasets. Surprisingly, there is much less work about numerical pattern mining and this research area remains under-explored. In this paper, we propose Mint, an efficient MDL-based algorithm for mining numerical datasets. The MDL principle is a robust and reliable framework widely used in pattern mining, and as well in subgroup discovery. In Mint we reuse MDL for discovering useful patterns and returning a set of non-redundant overlapping patterns with well-defined boundaries and covering meaningful groups of objects. Mint is not alone in the category of numerical pattern miners based on MDL. In the experiments presented in the paper we show that Mint outperforms competitors among which Slim and RealKrimp.


Introduction
The objective of pattern mining is to discover a small set of interesting patterns that describe together a large portion of a dataset and can be easily interpreted and reused. Actually pattern mining encompasses a large variety of algorithms in knowledge discovery and data mining aimed at analyzing datasets (Vreeken and Tatti, 2014). Present approaches in pattern mining are aimed at discovering an interesting pattern set rather than a set of individually interesting patterns, where the quality of patterns is evaluated w.r.t. both the dataset and other patterns. One common theoretical basis for pattern set mining relies on the Minimum Description Length principle (MDL) (Grünwald, 2007), which is applied to many types of patterns, e.g. itemsets (Vreeken et al., 2011), patterns of arbitrary shapes in 2dimensional data (Faas and van Leeuwen, 2020), sequences (Hinrichs and Vreeken, 2017), graphs (Bariatti et al., 2020), etc.
Contrasting the recent advances in pattern mining, algorithms for mining numerical data appear to be insufficiently explored. To date, one of the most common way to mine numerical pattern sets relies on the application of itemset mining to binarized datasets. This is discussed below in more detail but before we would like to mention an alternative to numeric pattern mining which is "clustering".
In the last years, clustering algorithms have been extensively developed and many different and efficient approaches have been proposed (Jain, 2010;van Craenendonck et al., 2017;Jeantet et al., 2020). However, there is an important conceptual difference between pattern mining and clustering. In pattern mining the description comes first, while in clustering the primacy is given to the object similarity. In other words, numerical pattern mining is more interested in the description of a group of objects in terms of a set of attributes related to these objects, while clustering focuses more on the detection of these groups of objects based on their commonalities as measured by a similarity or a distance. The former entails some requirements for the ease of interpretation, i.e., the resulting patterns should describe a region in the "attribute space" that is easy to interpret. By contrast, in clustering, the focus is put on groups of objects or instances. The clusters can be constrained to have certain shapes, e.g., spheres in K-means or DBSCAN, but still the similarity of objects remains the most important characteristic of clusters. For example, clustering techniques such as agglomerative single-linkage clustering in a multidimensional space may return clusters of very complex shapes. Usually no attention is paid to these shapes while this is one of the most important preoccupation in numerical pattern mining.
Accordingly, in this paper, we propose an MDL-based approach to numerical pattern set mining called Mint for "Mining INTeresting Numerical Pattern Sets". Mint computes numerical patterns as m-dimensional hyper-rectangles which are products of m intervals, where the intervals are related to the attributes and their values. The main benefits of the Mint approach are that (i) Mint does not need to explore the pattern space in advance as candidate to become optimal patterns are computed on the fly, (ii) the total number of explored patterns is at most cubic (and it is at most quadratic at each iteration) in the number of objects with distinct descriptions considered as vectors of attribute values, (iii) Mint is based on MDL and outputs a small set of non-redundant informative patterns.
In addition, a series of experiments shows that Mint is efficient and outputs sets of patterns of high quality: the patterns describe meaningful groups of objects with quite precise boundaries. Actually, the Mint algorithm is able to mine numerical patterns both on small and on large datasets, and it is most of the time more efficient and reliable than its competitors Slim and RealKrimp. The proposed encoding scheme is based on prequential plug-in codes, which have better theoretical properties than the codes used in Slim, RealKrimp and an MDL-based method for discretization called IPD. The paper has the following structure. In Section 2 we discuss the state-of-the art algorithms in itemset pattern mining for numerical data. Section 3 introduces the main notions used in the paper while in Section 4 we describe the bases of proposed method. Next Section 5 relates the experiments carried out for illustrating the good behavior and the strengths of Mint. Finally, Section 6 concludes the paper with a discussion about the potential of Mint and some directions for future work.

Related Work
The problem of pattern mining has been extensively studied for binary dataitemset mining-but remains much less explored for numerical data. Hence a common way to mine patterns in numerical data relies on a binarization of data and then application of itemset mining algorithms. Meanwhile, a number of approaches was designed for mining numerical datasets possibly involving binarization and taking into account the type of the data at hand. In this section we firstly discuss different numerical data preprocessing approaches allowing the use of itemset mining and then we discuss state-of-the art approaches in numerical pattern mining.

Numerical Data Preprocessing
The data preprossessing is the cornerstone for discovering patterns of good quality and relies on discretization or binarization tasks.
Discretization. Discretization relies on partitioning the range of an attribute value into intervals and then mapping the intervals into integers for preserving the order of the intervals. The existing discretization techniques can be categorized into univariate and multivariate techniques.
The univariate discretization includes all the methods where attributes are considered independently. An attribute range may be split into intervals of equal width or equal height w.r.t. frequency. Another way to split an attribute range is based on the K-means algorithm (Dash et al., 2011), where some criteria is used for assessing the quality of clustering and choosing an optimal K. A more flexible approach consists in splitting based on the MDL principle (Kontkanen and Myllymäki, 2007;Rissanen et al., 1992) which is discussed in more length below.
The fact of considering each attribute range independently does not preserve the interaction between attributes and, as a consequence, may make some patterns not recognizable. The multivariate discretization techniques were proposed to tackle this issue. In (Mehta et al., 2005;Kang et al., 2006), multivariate discretization is based on principal component analysis and independent component analysis, respectively. However, both techniques do not guarantee to take into account possible complex interactions between attributes and require some assumptions on either distribution or correlation (Nguyen et al., 2014). Accordingly, authors in (Nguyen et al., 2014) propose an MDL-based algorithm for multivariate discretization which shows the shortcomings mentioned above and which works in unsupervised settings (contrasting a related approach in (Fayyad and Irani, 1993;Boullé, 2006;Bondu et al., 2010)). Indeed, MDL is used in a large number of approaches and is detailed below in § 2.2.
Binarization. Discretization is not the only step to accomplish before applying an itemset mining algorithm. Another important operation is binarization, i.e., the transformation of discrete values into binary attributes. Binarization should be carefully taken into account as it may affect the results of itemset mining and induce the loss of important information. Moreover, binarization is associated with the risk of introducing artifacts and then obtaining meaningless results.
A simple and popular binarization is based on "one-hot encoding", where each discrete value is associated with one binary attribute. The number of attributes may become very large which can lead to an excessive computational load. Moreover, one-hot encoding does not necessarily preserve the order of discrete values.
By contrast, interordinal scaling (Kaytoue et al., 2011) preserves the order of values by introducing for each discrete value v two binary attributes "x ≥ v" and "x ≤ v". However, in (Kaytoue et al., 2011) it was shown that, with a lowfrequency threshold, mining itemsets in interordinally scaled data becomes much more expensive than mining hyper-rectangles in numerical data. Hyper-rectangles here are studied in the framework of interval pattern structures.
An alternative approach to interordinal scaling (Srikant and Agrawal, 1996) consists in computing more general itemsets based on considered discrete values. The authors introduces the notion of the partial completeness w.r.t. a given frequency threshold. This notion allows one to formalize the information loss caused by partitioning as well as to choose an appropriate number of intervals w.r.t. chosen parameters. As the interordinal scaling, this approach suffers from pattern explosion. In addition, this method requires to set some parameters, e.g., frequency threshold and completeness level, however, their optimal values are unknown.
Despite its limitations, one-hot encoding remains a good option provided that suitable constraints can be defined for avoiding attribute explosion and allowing for tractable computation.
Numerical attribute set assessment based on ranks. One of the main drawbacks of the above mentioned approaches that consider discretization and binarization as mandatory preprocessing steps, is that the quality of the output depends on the quality of the discretization. In mining numerical patterns, when the boundaries of patterns are not well aligned as shown in the figure on the right, uniform boundaries will produce imprecise descriptions, while using exact boundaries may greatly complicate pattern mining.
An alternative approach that "simulates" multi-threshold discretization is proposed in a seminal paper (Calders et al., 2006). It consists in (i) considering the ranks of attribute values instead of actual real values, and (ii) evaluating the sets of numerical attributes using rank-based measures. In (Calders et al., 2006), the authors propose several support measures based on ranks. In such a way, the problem of dealing with concrete attribute values is circumvented by considering the coherence of the ranked attribute values. Moreover, in (Tatti, 2013), the authors propose two scores to evaluate a set of numerical attributes using ranked attribute values as well. The scores are used to find the best combinations of attributes w.r.t. rank-based supports.
In all the methods mentioned in this subsection, patterns are understood as combinations of the attribute ranges as a whole. These methods do not provide descriptions related to some particular parts of the range if needed, which is the main focus of this paper.

MDL-based approaches to Pattern Mining
The MDL principle (Grünwald, 2007) is based on the slogan: "the best set of patterns is the set that compresses the database best". There is a significant amount of papers about the use of the MDL principle in pattern mining and this is very well presented in the report of Esther Galbrun (Galbrun, 2020). MDL has been used in many different contexts but hereafter we focus on pattern mining. One of the most famous MDL-based itemset miners is Krimp which was introduced in (Vreeken et al., 2011). Krimp relies on two steps that consist in (i) generating a set of frequent patterns, and (ii) selecting those minimizing the total description length. While Krimp is an efficient and well-designed itemset miner, it requires that all frequent itemsets should be generated. Moreover, increasing the frequency threshold may lead to a worse compression, so the Slim system (Smets and Vreeken, 2012) was proposed to tackle this issue. In contrasting to Krimp, Slim does not require that all itemsets should be generated in advance, since the candidates to become optimal itemsets are discovered gradually. Nevertheless, the encoding scheme used in Krimp and Slim shows a range of limitations that are discussed in more detail in Section 3.2. In continuation, the DiffNorm algorithm (Budhathoki and Vreeken, 2015) is an extension of Slim that is based on a better encoding scheme and can be applied to a collection of datasets for finding the difference in datasets in terms of itemsets. Another MDL algorithm related to the Krimp family was proposed in (Akoglu et al., 2012) for fixing the scalability issues. This algorithm deals with categorical data and is less sensitive to combinatorial explosion.
All the aforementioned MDL-based algorithms represent a "model", i.e. a set of patterns, as a two-column table, where the left-hand column contains the pattern descriptions and the right-hand column contains the associated code words. Another way to store patterns is proposed in the Pack algorithm (Tatti and Vreeken, 2008), where the model is encoded as a decision tree, so that a node corresponds to an attribute. A non-leaf node has two siblings reflecting the presence or absence of this attribute in an itemset. The itemset, in turn, is a path from the root to a leaf node. One main difference between the Pack approach and the algorithms of the Krimp family is that 0's and 1's are symmetrically considered in Pack.
The Stijl algorithm (Tatti and Vreeken, 2012) is a tree-based MDL approach taking into account both 0's and 1's and storing itemsets in a tree. However, contrasting Pack, Stijl relies on "tiles", i.e., rectangles in a dataset. The tree in Stijl is a hierarchy of nested tiles, where parent-child relations are inclusion relations within the set of tiles. A child tile is created whenever its density -the relative number of 1's-differs a lot from the parent one. An extension of tile discovery is proposed in (Faas and van Leeuwen, 2020) where "geometric pattern mining" with the Vouw algorithm is introduced. This algorithm may consider arbitrarily shaped patterns in raster-based data, i.e., data tables with a fixed order of rows and columns, and it is able to identify descriptive pattern sets even in noisy data. Finally, the discovery of tiles is also closely related to Boolean Matrix Factorization (BMF). In a nutshell, the objective of BMF is to find an approximation of a binary matrix C by a Boolean product of two low-rank matrices A and B. The columns of A and the rows of B describe the factors, which correspond to tiles. The MDL principle can also be applied to the BMF problem (Miettinen and Vreeken, 2014;Makhalova and Trnecka, 2020).
All the MDL-based algorithms which are surveyed above apply to binary or categorical data. Now we focus on a few algorithms which are dealing with pattern mining in numerical data. First of all the RealKrimp algorithm (Witteveen et al., 2014) is an extension of Krimp to real-valued data, where patterns are based on axis-aligned hyper-rectangles. Even if the algorithm does not require any preprocessing, it actually needs a discretization of the data. Moreover, there is also a "feature selection" step where unimportant hyper-rectangle dimensions are removed. RealKrimp is tailored to mine high-density patterns, and to minimize the combinatorial explosion, it constructs each hyper-rectangle using a pair of neighboring rows sampled from the original dataset. Then, without prior knowledge about the data, the choice of the size of sampling is difficult as a too small sample size may output very general patterns, while a too large sample size may increase the execution time. The problem of an inappropriate sample size may be partially solved by setting a large "perseverance", i.e., how many close rows should be checked to improve compression when enlarging the hyper-rectangle, and "thoroughness", i.e., how many consecutive compressible patterns are tolerated. As it can be understood, finding optimal parameters in RealKrimp constitutes an important problem in the pattern mining process. Moreover, the hyper-rectangles in RealKrimp are evaluated independently, meaning that the algorithm searches for a set of optimal patterns instead of an optimal pattern set. The subsequent pattern redundancy may be mitigated by sampling data and computing the hyperrectangles in different parts of the attribute space. Thereby, RealKrimp relies on many heuristics and has no means to jointly evaluate the set of generated hyperrectangles. In addition, heuristics imply some prior knowledge about the data which is not always available in practice. All these aspects should be taken into account.
Another approach to mine informative hyper-rectangles in numerical data was proposed in (Makhalova et al., 2019). The approach can be summarized in 3 steps: (i) greedily computing dense hyper-rectangles by merging the closest neighbors and ranking them by prioritizing dense regions, (ii) greedily optimizing an MDLlike objective to select the intervals -sides of hyper-intervals-for each attribute independently, (iii) constructing the patterns using the selected intervals and maximizing the number of instances described by the intervals by applying a closure operator (a closed set is maximal for a given support). Actually, this approach tends to optimize entropy, which is proportional to the length of data encoded by the intervals, and does not take into account the complexity of the global model, i.e., the set of patterns. This simplification is based on the observation that each newly added interval replaces at least one existing interval, and thus, the complexity of the model does not increase. Moreover, the compression process is lossy as the data values can be reconstructed only up to some selected intervals. Finally, the approach allows for feature selection, but does not address explicitly the problem of overlapping patterns.
Based on this first experience, below we propose Mint algorithm, which is based on MDL and aimed at mining patterns in numerical data. We restrict the patterns to be hyper-rectangles as they are the most interpretable types of multidimensional patterns. As in RealKrimp, the Mint algorithm deals with discretized data which allow us to define a lossless compression scheme. The problem of feature selection is not addressed while patterns may overlap. Finally, contrasting RealKrimp, Mint is less dependent on heuristics and discovers an MDL-optimal pattern set rather than single optimal patterns.

Formalization of data and patterns
Let D be a dataset that consists of a set of objects G = {g 1 , . . . , gn} and a set of attributes M = {m 1 , . . . , m k }. The number of objects and attributes is equal to n and k, respectively. Each attribute m i ∈ M is numerical and its range of values is denoted by range(m i ). Each object g ∈ G is described by a tuple of attribute values δ(g) = v i i∈{1,...,k} .
As patterns we use axis-aligned hyper-rectangles, or "boxes". In multidimensional data, an axis-aligned hyper-rectangle has one of the simplest descriptions -a tuple of intervals-and thus can be easily analyzed by humans. The hyper-rectangle describing a set of objects B is given by We call the i-th interval of a hyper-rectangle the i-th side of the hyper-rectangle. The support of a hyper-rectangle h is the cardinality of the set of objects whose descriptions comply with h, i.e., sup(h) = |{g ∈ G | δ(g) ∈ h}|.
Often, instead of continuous numerical data, one deals with discretized data, where the continuous range of values range(m i ) is replaced by a set of integers, which are the indices of the intervals. Formally speaking, a range range(m i ) is associated with a partition based on a set of intervals B i = {B j i = [c j−1 , c j ) | j = 1, . . . , l}, where c 0 and c l are the minimum and maximum values, respectively, of range(m i ). Thus, each v ∈ [c j−1 , c j ) is replaced by j.
The endpoints of the intervals can be chosen according to one of the methods considered above, e.g., equal-width, equal-height intervals or using the MDL principle, and the number of the intervals may vary from one attribute range to another attribute range. The endpoints make a discretization grid. The number of the grid dimensions is equal to the number of attributes.
A chosen discretization splits the space i.e., each side of an elementary hyper-rectangle is composed of one discretization interval B j i . Non-elementary hyper-rectangles are composed of consecutive elementary hyper-rectangles.
For a hyper- i are endpoints of intervals from B i , in the discretized attribute space we define the size of the ith side as the number of elementary hyper-rectangles included into this Further, we use h to denote a hyper-rectangle (pattern) and H to denote a set of hyper-rectangles (patterns). Example. Let us consider a dataset given in Fig. 1 (left). It consists of 12 objects described by attributes m 1 and m 2 . All the descriptions are distinct (unique). Each attribute range is split into 8 intervals of width 1. The discretized dataset  is given in Fig. 1 (right). It has 7 unique rows. The non-empty elementary hyperrectangles correspond to non-empty squares induced by the 8 × 8 discretization grid. The number of hyper-rectangles is equal to the number of distinct rows in the discretized dataset (given in the middle).

Information Theory and MDL
MDL (Grünwald, 2007) is a general principle that is widely used for model selection and works under the slogan "the best model compresses data the best". This principle is grounded on the following model: given a sequence that should be sent from a transmitter to a receiver, the transmitter, instead of encoding each symbol uniformly, replaces repetitive sub-sequences with code words. Thus, instead of a symbol-wise encoded sequence, the transmitter sends a sequence of code words and a dictionary. The dictionary contains all used code words and the sub-sequences encoded by them. Using the dictionary, the receiver is able to reconstruct the original sequence. The MDL principle is applied to decide which sub-sequences should be replaced by the code words and which code words should be chosen for these sub-sequences. The code words are associated in a such a way that the most frequent sub-sequences have the shortest code words. Applied to our case, as the sequence that should be transmitted, we consider a numerical dataset, and as sub-sequences we chose patterns (hyper-rectangles). Formally speaking, given a dataset D the goal is to select such a subset of patterns H that minimizes the description length L(D, H). In the crude version of MDL (Grünwald, 2007) the description length is given by L(D, H) = L(H) + L(D|H), where L(H) is the description length of the model (set of patterns) H, in bits, and L(D|H) is the description length of the dataset D encoded with this set of patterns, in bits.
The length L(H) characterizes the complexity of the set of patterns and penalizes high-cardinality pattern sets, while the length of data L(D|H) characterizes the conformity of patterns w.r.t. the data. L(D|H) increases when the patterns are too general and do not conform well with the data. Thus, taking into account both L(H) and L(D|H) allows to achieve an optimal balance between the pattern set complexity and its conformity with the data.
Roughly speaking, the minimization of the total length consists in (i) choosing patterns that are specific for a given dataset, and (ii) assigning to these patterns the code words allowing for a shorter total length L(D, H).
In MDL, our concern is the length of the code words rather than the codes themselves. That is why we use a real-valued length instead of an integer-valued length.
Intuitively, the length of code words is optimal when shorter code words are assigned to more frequently used patterns. From the information theory, given a probability distribution over H, the length of the Shannon prefix code for h ∈ H is given by l(h) = − log P (h) and is optimal. Then we obtain the following probability model: given the usage usg(h) of h ∈ H in the encoding. The probability distribution that ensures an optimal pattern code length for the chosen encoding scheme is given by where the usage usg(h) of a pattern h is the number of times a pattern h is used to cover objects G in a dataset D. However, this model is based on the assumption that the total number of encoded instances (the length of the transmitting sequence) is known. Moreover, in order to encode/decode the message, the transmitter should know the usages usg(h) of all patterns h ∈ H and the receiver should know the corresponding probability distribution, this is not usually the case.
Prequential plug-in codes (Grünwald, 2007) do not have this kind of limitation. These codes refer to "online" codes since they can be used to encode sequences of arbitrary lengths and they do not require to know in advance the usage of each pattern. The codes are based on only previously encoded instances. Moreover, they are asymptotically optimal even without any prior knowledge on the probabilities (Grünwald, 2007). The prequential plug-in codes are widely used in recent MDL-based models (Faas and van Leeuwen, 2020;Proença and van Leeuwen, 2020;Budhathoki and Vreeken, 2015).
More formally, the idea of the prequential codes is to assess the probability of observing the n-th element h n of the sequence based on the previous elements h 1 , . . . , h n−1 . Thus prequential codes allow for a predictive-sequential interpretation for arbitrary length sequences.
Let H n be the sequence h 1 , . . . , h n−1 , h n . The probability of the n-th pattern h n ∈ H in the pattern sequence H n is given by where usg(h) is the number of occurrences of pattern h in the sequence H n , and usg(H) = h∈H usg(h) is the length of the sequence, i.e., the total number of occurrences of patterns from H. Γ is the gamma function. We give the technical details of the derivation of Equation 1 in Appendix A.
Then the length of the code word associated with h n is given as follows: As it was mentioned above, we are interested in the length of the code words rather than in the code words themselves. That is why we use real-valued length instead of integer-valued length for the number of bits needed to store the real code words.
To encode integers, when it is needed, we use the standard universal code for the integers (Rissanen, 1983) given by L N (n) = log n + log log n + log log log n + . . . + log c 0 , where the summation stops at the first negative term, and c 0 ≈ 2.87 (Grünwald, 2007). In this paper we write log for log 2 and put 0 log 0 = 0.

Mint
We propose an approach to pattern mining in multidimensional numerical discretized data. The main assumption we rely on is that all the attributes are important, i.e., patterns are computed in the whole attribute space. To apply this method we consider a discretized attribute space, i.e., each attribute range is split into equal-width intervals, as it was done in (Witteveen et al., 2014;Nguyen et al., 2014). The choice of the equal-width intervals is due to the fact that the cost, in bits, of the reconstruction of a real value here is constant for all intervals. Each object therefore is included into an |M |-dimensional elementary hyper-rectangle. Starting from the elementary hyper-rectangles (each side is composed of one interval), we greedily generalize the currently best patterns and select those that provide the maximal reduction of the total description length. At each step we reuse some of the previously discovered candidates as well as other candidates computed on the fly using the last added pattern.

The model encoding
Firstly, we define the total description length of the set of hyper-rectangles and the data encoded by them. The total description length is given by L(D, H) = L(H) + L(D | H), where L(H) is the description length, in bits, of the set of hyper-rectangles H, and L(D|H) is the description length, in bits, of the discretized dataset encoded by this set of hyper-rectangles. The initial set of the hyper-rectangles is composed exclusively of elementary ones.
To encode the set of hyper-rectangles H, we need to encode the discretization grid and the positions of the hyper-rectangles in this grid. Thus, the total length of the pattern set is given by To encode the grid we need to encode the number of dimensions (attributes) |M | and the number of intervals |B i | within each dimension i. This grid is fixed and is not changed throughout the pattern mining process. To encode the pattern set H, given the grid, we need to encode the number of patterns |H| and the positions of their boundaries within each dimension. Since there exist ( |Bi| 2 ) + |B i | possible positions of the boundaries within the i-th dimension, namely ( |Bi| 2 ) combinations where the boundaries are different, and |B i | cases where the lower and upper boundaries belong to the same interval. These positions are encoded uniformly. The latter gives the cost of log(|B i |(|B i | + 1)) bits for encoding the i-th side of a pattern within the chosen grid.
The length of a dataset encoded with the set of patterns is given by cost of encoding the number of instances where the first component encodes the number of objects, the second one corresponds to the length of data encoded with hyper-rectangles, and the third one corresponds to the cost of the reconstruction of the object description δ(g) = v i i∈{1,...,|M |} up to elementary intervals. Let us consider the last two components in detail.
The cost of the reconstruction of the true real values is constant for all values due to the equal-width discretization and it is not changed during pattern mining, thus is not taken into account in L(D, H). The dataset is encoded by exploring all objects in a given order and assigning to each object a code word of the pattern covering this object. According to the MDL principle, each data fragment should be covered (encoded) only once, otherwise, the encoding is redundant. However, some patterns might "conflict", i.e., include the same object. A covering strategy then defines which data fragment is an occurrence of which pattern.
Here, the usage is defined as follows: We discuss the covering strategy in detail in Section 4.2.
From Equation 2, the length of data encoded with the plug-in codes is given by where usg(H) = h∈H usg(h).
Once each object has been associated with a particular pattern, its original description within the pattern up to elementary intervals is encoded in L(D D(H)). We use D D(H) to denote the difference ("distortion") between the initially discretized dataset D and the same dataset encoded with H.
To reconstruct the dataset up to the elementary equal-width intervals we encode the positions of each object within the corresponding pattern, this cost is given by where size(h, i) is the number of elementary intervals that compose the side i of the pattern h. Example. Let us consider an encoding of the data by patterns according to the model introduced above for the case of the running example. We take the set of two hyper-rectangles H = {h 11 , h 12 }, which are given in Fig. 1. Let the cover of h 11 be cover(h 11 , G) = {g 5 , . . . , g 12 } and cover of h 12 be cover(h 12 , G) = {g 1 , g 2 , g 3 , g 4 }.
Then, the encoding of the pattern set is given by L(H) = L N (2) + 2 · L N (8) + L N (2) + 2 · 2 · log 36. Here, we need 2 log 36 bits to encode each pattern, i.e., log 36 bits to encode uniformly 36 possible positions of the boundaries for each side of the hyper-rectangle.
The length of data encoded by H is given by The reconstruction error is equal to L(D D(H)) = 8 · (log(4) + log(4)) + 4 · (log(5) + log(5)), i.e., we need to encode the positions of the data points within the corresponding hyperrectangles up to the elementary hyper-rectangles.
As we can see from the example above, the patterns can overlap. In such a case, one relies on a covering strategy to decide which pattern to use to encode each object. In the next section we introduce the algorithm that defines this strategy and allows for computing patterns minimizing the total description length.

The Mint Algorithm
The objective of the Mint algorithm is to compute in a numerical dataset a pattern set which is the best w.r.t. the MDL principle. Computing Minimal Pattern Set. Let M be a set of continuous attributes, G be a set of objects having a description based on attributes M , P be a set of all possible |M |-dimensional hyper-rectangles defined in the space m∈M range(m), and cover be a covering strategy. One main problem is to find the smallest set of hyper-rectangles H ⊆ P such that the total compressed length L(D, H) is minimal.
The pattern search space in numerical data, where patterns are hyper-rectangles, is infinite. Even considering a restricted space, where all possible boundaries of the hyper-rectangles are limited to the coordinates of the objects from G, the search space is still exponentially large. The introduced total length L(D, H) does not exhibit (anti)monotonicity property over the pattern set, and thus does not allow us to exploit some efficient approaches to its minimization. Hence, to minimize L(D, H), we resort to heuristics.

Main algorithm
Accordingly, the main idea of Mint is the following. Starting from elementary hyper-rectangles, we sequentially discover patterns that minimize the description length L(D, H) by merging a pair of currently optimal patterns from H. To compute a candidate pattern based on a pair of other patterns, we introduce the join operator ⊕. For two hyper- i ) i∈{1,...,|M |} , their join is given by the smallest hyper-rectangle containing them, i.e., We determine the cover of h j ⊕ h k as the union of the covers of h j and h k , i.e., cover(h j ⊕ h k , G) = cover(h j , G) ∪ cover(h k , G). Thus, the usage of h j ⊕ h k is simply the cardinality of its cover, i.e., usg(h j ⊕ h k ) = |cover(h j ⊕ h k , G)|. Since the elementary hyper-rectangles form a partition on G, it follows from the definition of cover that the usage is additive, i.e., usg(h j ⊕ h k ) = usg(h j ) + usg(h k ). Thus, each object is covered by a single pattern from H. We say that pattern h encodes an object if it covers it.
Among all candidates {h j ⊕ h k | h j , h k ∈ H} we consider as the best ones those that ensure the largest gain in the total description length: .
(3) The term "gain" stands for the difference between the total description lengths obtained using the current pattern set H and the pattern set where patterns h j and h k are replaced by its join h j ⊕ h k . The gain is the largest for the candidates that compress better a given dataset.
The minimization of L(D|H) consists in an iterative process where candidates are computed using pairs of currently optimal patterns and selecting one that provides the largest gain in the total description length.
The pseudocode of Mint is given in Algorithm 1. At the beginning, the optimal patterns H are the elementary hyper-rectangles (line 2) induced by an equal-width discretization into a chosen number of intervals |B i |, i = 1, . . . , |M |. We also set an additional parameter k to limit the number of candidates by k nearest neighbors. For large datasets and large number of intervals |B i |, setting a low value k << |G| reduces the computational efforts. In the discretized space, the elementary hyperrectangles are points, thus the distance between them is the Euclidean distance. Then, given a hyper-rectangle h j ⊕ h k , the neighbors are the neighbors of h j and h k . The main loop in lines 5-18 consists in selecting the best candidates from the current set of candidates C, updating the set of optimal patterns H, and collecting new candidates in Cnew. Once all candidates from C have been considered in the inner loop (lines 8-15), the new candidates from Cnew become current ones (line 16). In the inner loop, lines 8-15, the candidates that minimize the total description length are selected one by one. They are considered by decreasing gain ∆L. At each iteration of the inner loop, the candidate h j ⊕ h k providing the largest gain ∆L is taken, the corresponding optimal patterns h j and h k are replaced with h j ⊕ h k in H. The candidates based on the newly added patterns are added to Cnew (line 11) and are not considered at the current iteration. In Cnew we store pairs of indices making new candidates, and only in line 16 we compute candidates by calculating Cnew ← ∅ 7: (h j ⊕ h k , ∆L) ← P opLargestGain(C) 8: while ∆L > 0 do 9: if h j , h k ∈ H then 10: L total ← L total − ∆L 13: end if 14: (h j ⊕ h k , ∆L) ← P opLargestGain(C) 15: end while 16: C ← Cnew 17: Mint-Pruning(D, H, N ) 18: end while 19: return H, L total the gains ∆L that they provide. These gains, however, are computed only for patterns h j ⊕ h k where both h j , h k are still present in the set H. Postponing the computation of candidates to line 16 allows us to reduce the number of candidates and to speed up pattern mining. The outer loop stops when there are no more candidates in C. After that, the pruning can be performed (line 17). We consider the details of the pruning strategy after the next example. Example. Let us consider how the algorithm works on the running example from Fig. 1. Initially, the set of hyper-rectangles consists of elementary ones, i.e., h 1 , . . . , h 7 (Fig. 2). We restrict the set of candidates by considering only one nearest neighbor for each pattern. If a pattern has more than one nearest neighbor we select a pattern with the smallest index. The nearest neighbors for each elementary hyper-rectangle are given in Fig. 2 (left). Thus, the set of candidates is given by The patterns are added in the following order: h 8 = h 1 ⊕ h 3 , h 9 = h 4 ⊕ h 6 , h 10 = h 5 ⊕ h 7 , which corresponds to decreasing gain. After that, set C does not contain candidates that can improve the total length. Thus, Mint proceeds by considering the candidates from Cnew = {h j ⊕ h k | j, k = 2, 8, 9, 10, j = k}, which are the candidates composed of pairs of recently added patterns and the unused old ones. The newly added patterns are h 11 = h 9 ⊕ h 10 and h 12 = h 2 ⊕ h 8 . The new candidate set is Cnew = {h 11 ⊕ h 12 }. The algorithm terminates, the set of hyper-rectangles corresponding to the smallest total description length is H = {h 11 , h 12 }.
Complexity of Mint. At the beginning, the number of candidates, i.e., pairs of elementary hyper-rectangles (line 4) is O(min(|H| 2 , k · |H|)), where |H| is the number of non-empty elementary hyper-rectangles.
however it is possible either to set a small number of initial intervals |B i | that ensure |H| << |G| or to restrict the number of candidates. The theoretical complexity of the considered algorithms is estimated based on different features. In RealKrimp, the size of the sampling s mainly affects the time complexity, the cost of computing the first hyper-rectangle is O(|M |s 2 log s + |M ||G|s), additional ones are mined in O(|M |s 2 +|M ||G|s). In the worst case, where the sample size is proportional to the number of objects, the time complexity is O(|M ||G| log |G|) and O(|M ||G| 2 ) for the first and additional hyper-rectangles, respectively. In Mint the main component is the number of hyper-rectangles which is at most |G|, thus, the total time complexity is O(|M ||G| 2 + |G| 3 ). Thus, both RealKrimp and Slim have polynomial complexity w.r.t. the dataset size. Slim has the largest worst-case complexity O(|C| 3 |G||I|), where |C| = O(2 min(|G|,|I|) ) is the number of the candidates, which can be exponential in the size of the dataset. Moreover, the size of the dataset used in Slim is larger than the size of the dataset used by Mint and RealKrimp, since the number of attributes |I| in a binarized dataset is larger than the number of attributes |M | in the discretized one. Thus, RealKrimp and Mint have polynomial complexity in the input size. However, in practice, Mint works much faster as shown in the experiments.

Pruning strategy
In some cases, it may happen that merging a pair of patterns does not ensure minimization of the total description length while merging several patterns at once does provide a shorter total description length. We propose a pruning strategy that consists in merging several candidates when the candidates generated by a pair if ∆ h > ∆ then 12: S ← S ∪ {h} 13: of patterns do not provide a shorter description length. The pseudo-code of this procedure is given in Algorithm 2.
The outer loop in lines 2-22 is executed while there are some candidates allowing for a shorter total length, i.e., the number of patterns in H decreases. At each iteration of the outer loop, a new set of candidates C is created (line 4). As candidates we consider all pairs h j , h k such that the smallest hyper-rectangle including h j ⊕ h k also contains at least one pattern h ∈ H that differs from h j and h k . We order candidates by decreasing gain ∆L and consider at the current iteration the top-N candidates.
Then, in the inner loop in lines 5-21, we check candidates h j ⊕h k one by one. In contrast to Mint, we do not require anymore that each candidate h j ⊕ h k improves the total description length since in lines 8-17 we extend it with other patterns. Those patterns that improve the gain are stored in S. Once all hyper-rectangles contained in h j ⊕h k have been considered, the set S ∪{h j ⊕h k } contains all patterns that will be replaced with h j ⊕ h k , if this candidate ensures a positive gain in the total description length (lines 18-20).
Complexity of Pruning. At the beginning, the number of candidates is O(|H| 2 ), where |H| is the number of the currently optimal patterns. This value does not exceed the number of elementary hyper-rectangles that, in turn, is not greater than |G|. We may restrict the number of considered candidates C to N (line 5). Thus, setting N << |H| we have a linear number of candidates at each iteration, however, without restrictions, the number of candidates is O(|H| 2 ). Computing a candidate from a pair of patterns takes O(|M |). For each candidate we search for the included patterns, which takes O(|M ||H|). Thus, in total we have O(|H| 2 (|M | + |M ||H|) ∼ O(|M ||H| 3 ) for one iteration of the inner loop. Since there can be at most O(|H|) iterations of the outer loop, the worse total complexity of pruning is O(|M ||H| 4 ). However, H and the number of iterations of the outer loop are usually small, and pruning is performed fast. Otherwise, the set of the candidates can be limited to the top N .

Experiments
In this section, we compare Mint with Slim and RealKrimp -the most similar MDL-based approaches to numerical pattern mining. Slim and RealKrimp are not fully comparable with our approach, since they have their own parameters that actually affect both the performance and the quality of the results.
Slim works with binarized data, while Mint and RealKrimp work with discretized data. However, Slim and Mint allow for choosing the number of discretization intervals. Slim is better adapted to mine patterns in datasets with a coarse discretization. It should be notices that a coarse discretization results in a moderate increase in the number of attributes, while a fine discretization usually results in a drastic increase and can make the task intractable. By contrast, Mint is able to mine patterns efficiently even in datasets with a fine discretization. A last difference is that Slim and Mint evaluate a pattern set as a whole, while RealKrimp evaluates each pattern in a set independently.
Parameters of the methods. To compare the aforementioned methods we chose the following parameters. For Slim and Mint, that allow for choosing the discretization strategy, we chose the discretization into 5 and |G| equal-width intervals. The first one is expected to be more suitable for Slim, while the second one is expected to give better results for Mint. For Mint we additionally set the number of neighbors, considered for computing candidates, equal to the number of intervals. We also use discretization by Interaction-preserving discretisation (IPD) (Nguyen et al., 2014) -an unsupervised multivariate MDL-based discretizer-under assumption that this method provides an optimal splitting of the attribute ranges. Since Slim deals with binary data, we transform each discretization interval into a binary attribute and use these data in Slim.
RealKrimp relies on a set of parameters, the most important among them are sample size, perseverance, and thoroughness. Sample size defines the size of the dataset sample that will be used to compute patterns. We consider samples of size |G|, 0.25|G| and 0.5|G|. The sample size affects the running time: the smaller samples allow for faster pattern mining operations, while too small samples may prevent to discover interesting patterns. Perseverance regulates the behavior of RealKrimp to reach a global minimum of the description length. Large values of perseverance help to reach a global minimum. Perseverance is then set to 1/5 of the sample size. Thoroughness is the maximal number of consecutive non-compressible hyper-intervals that should be considered. We set thoroughness equal to 100. The parameters of the real-world datasets are given in Table 1.
Compression ratio. Firstly, we consider the main quality measure of the MDL-based methods, namely compression ratio. RealKrimp mines each pattern independently from others, thus the compression ratio of a pattern set is not measurable in this case. Slim and Mint have different encoding schemes and compress binary and discretized datasets, respectively. Thus the compression ratios are not fully comparable. However, for the sake of completeness, we report the compression ratios that they provide in Fig. 3. As it was expected, Slim works better in the case of a coarse discretization. For example, for equal-width discretization into 5 intervals, Slim provides much better compression than Mint for datasets such as "aliva", "shuttle", "sensorless dd", and "mini". However, Mint works consistently better for fine discretized dataset (Fig. 3 in the middle, where the number of intervals is |G|). This can be explained by the fact that IPD and Mint compress the data in the same way, while Slim uses an additional binarization step, thus ... For the IPD-discretized data Slim often ensures better compression. This can be explained by the fact that IPD compresses the same data as Mint, and Mint might be unable to compress further the same dataset. Slim, in turn, compresses the dataset that was additionally binarized. Thus, the better compression of Slim may be partially explained by artifacts caused by this data transformation.
Total description length of the compressed data. Another important characteristic of MDL-based approaches is the total length resulting from compression. Because of the different forms of data used by Slim and Mint (binary and discrete, respectively), the algorithms may have quite different compressed total description lengths. Nevertheless, we compare them. The ratio of the total length of Slim by the total length of Mint is given in Fig. 4. As in the case of the compression ratio, RealKrimp does not allow for computing the total length of data encoded by a pattern set, it computes only length gains provided by single patterns. Fig. 4 shows that the total length of Slim is usually about 2 times greater than the total length of Mint. The latter can be explained, in particular, by the redundancy caused by data binarization. Then we may conclude that the encoding of the discretized data Running time. The next important question is the running time, which is reported in Table 2. The cases, where pattern sets are not computed filled in the table with ". . .". The performance of Slim and Mint is affected by the number of discretization intervals, while the performance of RealKrimp depends heavily on the sample size. The running time reported in the table shows that for small datasets (< 1k) all methods work fast and often complete the work in less than a second. For average-sized (< 50k) and large (> 50k) datasets the running time depends on the chosen parameters. Slim mines fast patterns in datasets with a coarse discretization (into 5 intervals). However, for fine discretizations (into |G| or IPD) the running time increases drastically. For example, for "shuttle" dataset, Slim terminates in 1 second, when the number of intervals is 5, while to mine patterns when the attribute ranges are split into |G| intervals and by IPD, Slim requires 17394 and 650 seconds, respectively. Again for Slim, the scalability issues are especially pronounced for datasets with a large number of attributes, e.g., for "gas sensor" dataset, Slim terminates in 8206, . . . 1 , and 72488 seconds, while Mint requires only 43, 1088, and 1000 seconds for the same discretization parameters. RealKrimp also suffers from poor scalability: for average-or large-size datasets, setting a small sample size, e.g., |G|, does not allow to find a sufficient amount of interesting patterns, while setting a reasonable sample size (0.25|G| or 0.5|G|) results in a drastic increase of the running time and memory requirement.
Our experiments show that Mint, dealing with the same discretization as Slim, requires less time to mine patterns, especially for large datasets. However, it is not enough to assess the performance of the patterns by considering their running time. It it also important to study how many patterns they return and which kind of patterns.
Number of MDL-selected patterns. Intuitively, the number of patterns should be small, but sufficiently enough to describe all interesting relations between attributes. The numbers of MDL-selected patterns for the studied methods is reported in Table 3. The table shows that, given the same discretization, Slim returns usually a larger number of patterns than Mint. As in the case of the running time, Slim is sensitive to a large number of attributes and in this case usually returns a much larger number of patterns than Mint. For example, for "gas sensor" dataset Slim returns 1608, . . . 1 , and 9554 patterns, while Mint, with the same discretization settings, returns only 216, 566 and 773 patterns, respectively.
RealKrimp, on the contrary, returns a much smaller number of patterns than Mint and Slim. For example, for "gas sensor" dataset it returns only 4, 30, and 49 patterns for the samples of size |G|, 0.25|G|, and 0.5|G|, respectively. Taking into account the running time, we can conclude that with the chosen parameters, the average running time per pattern is much larger for RealKrimp than for Slim and Mint. Thus, RealKrimp has the highest "cost" in seconds of generating a pattern. Now, let us examine the quality of the generated patterns.
Pattern similarity (redundancy). This parameter is particularly important for Re-alKrimp, where patterns are mined w.r.t. other patterns, but evaluated independently, and there are no guarantees for avoiding selection of very similar patterns.
To study pattern similarity, we consider the average pairwise Jaccard similarity computed w.r.t. the sets of objects that the patterns describe. We take into account all occurrences of patterns in data rather than their usage in the data covering (which is, by definition, non-redundant). However, the average pairwise Jaccard similarity is sensitive to the number of patterns in the set, i.e., for large pattern sets having several groups of very similar patterns, Jaccard similarity may be quite low and does not spot this "local" redundancy.
To tackle this issue, we do not consider pairwise similarity between all pairs, but rather the similarity between the most similar pairs, i.e. for each pattern we select at most 10 patterns among the most similar patterns w.r.t. Jaccard similarity. Then we compute the average value of similarity by removing the repetitive pairs of patterns if they are any. The average values of similarity are presented in Fig. 5.
The results of the experiments show that on average the pairwise Jaccard similarity is the smallest for Mint, and only slightly higher for Slim. In Slim higher values are caused by the fact that each object can be covered by different non-overlapping itemsets, thus these increased values of the Jaccard similarity are partially caused by the specificity of the model. RealKrimp has the largest values of the Jaccard similarity, close to 1 (see Fig. 5). This result is quite expected since Fig. 5 The average Jaccard similarity computed on the top-10 Jaccard-similar pairs for each pattern, repetitive pairs are discarded Fig. 6 The average accuracy of patterns the patterns are evaluated independently, thus the method does not minimize redundancy in the pattern set.
Accuracy of patterns. To evaluate the meaningfulness of the resulting patterns are, we measure their accuracy by considering the classes of objects they describe. The class labels are not used during pattern mining, and are considered only for assessing the pattern quality.
In Fig. 6, the results show that Slim and Mint, being based on the same discretizations, have quite similar average accuracy. RealKrimp return patterns with high accuracy for small datasets, however, loses in accuracy on large datasets. Accuracy of pattern descriptions. As it was mentioned in the introduction, in pattern mining it is important not only to describe meaningful groups of objects, but also to provide quite precise boundaries of these groups. Unfortunately, we cannot evaluate how precise are the pattern boundaries for real-world dataset, since we do not have any ground truth.
To evaluate how precise the boundaries of patterns we use synthetic datasets. We generate 6 types of 2-dimensional datasets with different number of patterns and different positions of patterns w.r.t. other patterns. The generated types of datasets are shown in Fig. 7. The ground truth patterns are highlighted in different colors. Further we use T to denote a set of ground truth hyper-rectangles. For all these types of data we generate datasets where each pattern contains 100, 200, 500, Fig. 7 Six types of the generated synthetic dataset 700, 1000 objects. In Fig. 7, the "simple" datasets consist of separable patterns. The "variations" datasets contain adjacent patterns, and thus allow for variations in pattern boundaries.
The "inverted" datasets include the most complicated patterns for Mint and Slim, since they treat asymmetrically dense and sparse regions. It means that these algorithms are not able to identify the hole in the middle. Instead of this hole, we may expect a complicated description of the dense region around this hole (see Appendix D, Fig. 18 for an example). "Simple overlaps" contains of overlapping patterns, while "simple inclusion" and "complex inclusion" can also contain patterns which are subsets of other patterns.
For all studied heuristics, namely discretization into 5, |G| equal-width intervals, and an IPD-discretization, Slim returns non-empty elementary rectangles induced by the chosen discretization, i.e., it does not merge any rectangles induced by the discretization grid. Thus, the quality of Slim-generated patterns is completely defined by the chosen discretization.
For Mint we consider the same discretization settings as for Slim, namely discretization into 5, |G| equal-width intervals, and an IPD-discretization. We study the different settings of Mint in Appendix C. For RealKrimp we study only default settings: samples of size 0.5|G|. For the discussion of the default settings of RealKrimp see (Witteveen, 2012).
We evaluate the quality of patterns using the Jaccard similarity applied to hyper-rectangles. For two hyper-rectangles h 1 and h 2 the Jaccard similarity is given by Jaccard(h 1 , h 2 ) = area(h 1 ∩ h 2 )/area(h 1 ⊕ h 2 ), where h 1 ∩ h 2 and h 1 ⊕ h 2 is the intersection and join of h 1 and h 2 , respectively.
We begin with the average pairwise Jaccard similarity of the computed patterns. The values reported in Fig. 8 (top row) show that Slim returns non-redundant patterns since they are non-overlapping, while RealKrimp returns very similar patterns. These patterns are redundant since even for the "simple" datasets, where all ground truth patterns are separable and non-overlapping, the patterns returned by RealKrimp are very similar. The similarity of Mint-selected patterns is very low, but it increases for the datasets with overlapping patterns, e.g., "simple overlaps" or "simple inclusion", and is almost 0 for the datasets with non-overlapping patterns, e.g., "simple" or "variations".
The next question is how well the boundaries of the computed patterns from H are aligned with the boundaries of the ground truth patterns from T , i.e., the patterns that we generated. We evaluate them by the average Jaccard similarity between the computed patterns and the most similar ground truth patterns as follows: Tatiana Makhalova et al. . The values close to 1 indicate that all the computed patterns are very similar to the patterns given in ground truth. The worst results corresponds to Slim: even with a "smart" IPD discretization, the boundaries computed by Slim are not very precise. The low values for fine discretized data are explained by the inability of Slim to merge elementary hyper-rectangles.
Mint with the IPD-discretization returns also quite poor results. However, in the best settings (discretization into |G| intervals), Mint and RealKrimp have quite high values of Jcd(H, T ). The latter means that all patterns from H are quite similar to the patterns given by ground truth.
Let us study the best patterns from each set, i.e., instead of considering all patterns we evaluate the quality of the best of them. We consider the average Jaccard similarity between the ground-truth patterns and the most similar patterns among the computed ones using the following formula: The results are reported in Fig. 8 (third row). The values close to 1 correspond to the case where each ground truth pattern has at least one pattern in H that is very similar to ground truth patterns. The results given in Fig. 8 shows that the quality of Mint-generated patterns for the default discretization into |G| intervals is the best. For some datasets RealKrimp works equally well, e.g., "simple overlaps" or "simple inclusion", but for others it may provide quite bad results, e.g., for the simplest set of patterns contained in the "simple" datasets.
Comparing the values of Jcd(H, T ) and Jcd(T , H) we may conclude that Re-alKrimp contains a lot of similar patterns, but these patterns do not match the ground truth patterns as well as the patterns generated by Mint. Thus, the experiments shows that Mint (with the fine discretization) returns patterns with quite precise boundaries and outperforms the state-of-the-art MDL-based pattern miners.

Discussion and conclusion
Numerical pattern mining is a challenging task which is sometimes compared to clustering. However, even if the two tasks may appear as similar, in numerical pattern mining the shapes of patterns are of first importance while in clustering the main concern is the similarity between objects and the resulting groups of objects. Accordingly, in this paper we propose a formalization of numerical pattern set mining problem based on the MDL principle and we focus on the following characteristics: (i) interpretability of patterns, (ii) precise pattern descriptions, (iii) non-redundancy of pattern sets, and (iv) scalability. In the paper we study and materialize these characteristics, and we also propose a working implementation within a system called Mint.
By "interpretability" we mean not only the ability to explain why a particular pattern is selected, but also the ease of analyzing a set of discovered numerical patterns for a human agent. With this regard, patterns of arbitrary shapes (e.g., Faas and van Leeuwen (2020)) or even polygons (e.g., (Belfodil et al., 2017)) may be not an appropriate choice when considering multidimensional numerical data. This is why we decided to work with one of the most common shapes, namely "hyper-rectangles", which are currently used in numerical pattern mining and related tasks (Witteveen et al., 2014;Kaytoue et al., 2011).
Another important requirement is that the boundaries of patterns should be "well-defined" and "quite precise". A common approach to numerical pattern mining consists in firstly a data binarization and secondly a reduction to itemset mining. Such an approach suffers from various drawbacks among which (i) the boundaries of patterns are not well-defined and this heavily affects the output, (ii) the scalability is not good because of the potential exponential number of attributes due to scaling, (iii) the information loss related to the loss of the interval order within a range may be very important. . . In our experiments we compare the behavior of Mint with the MDL-based itemset set miner Slim (associated with a scaling of numerical data). The experiments demonstrate that Slim generally provides quite poor patterns. Actually, when the discretization is too fine, Slim is not able to merge patterns into large patterns, while when the discretization is too coarse the algorithm returns very imprecise boundaries. In addition, we also consider another MDL-based algorithm, namely RealKrimp, which is, to the best of our knowledge, the only MDL-based approach dealing with numerical pattern mining without any prior data transformation. However, one main drawback of RealKrimp is that it mines patterns individually, and then the resulting patterns are very redundant.
Furthermore, in the experiments, both RealKrimp and Slim show a poor scalability. Mint may also have a high running time for some large datasets, but still staying at a reasonable level.
Mint may appear to be similar to IPD -for "Interaction-Preserving Discretization"-but both systems perform different tasks. Mint could work in collaboration with IPD since the latter does not return exactly patterns but mainly MDLselected boundaries. The elementary hyper-intervals induced from IPD results are only fragments of ground truth patterns. Then Mint could be applied to merge these elementary hyper-rectangles into larger hyper-rectangles.
Indeed, our experiments show that the data compressed by IPD can be even more compressed in applying Mint, i.e., the patterns as computed by IPD should still be completed for being comparable to those discovered by Mint. However, as the experiments show it, directly applying Mint to fine discretized data allows to obtain better results than applying IPD as a preprocessing step. This can be explained by the fact that IPD returns uniform or global boundaries, which are less precise than the boundaries specifically "tuned" by Mint for each pattern.
For summarizing, the Mint algorithm shows various very good capabilities w.r.t. its competitors, among which a good behavior on fine discretized datasets, a good scalability, and it outputs a moderate number of non-redundant patterns with precise boundaries. However, there is still room for improving Mint, for example in avoiding redundant patterns and in the capability of mining sparse regions in the same manner as dense ones.
Future work may be followed in several directions. Here, Mint works with an encoding based on prequential plug-in codes. It could be interesting to reuse other another encoding and to check how the performance of the system evolve, trying to measure what is the influence of the encoding choice. Moreover, we should consider more datasets and especially large and complex datasets, and try to measure the limit of the applicability of Mint, for in turn improving the algorithm in the details. In general, more experiments should still be considered for improving the quality the of Mint algorithm. Another interesting future direction is to use Mint in conjunction with clustering algorithm. This could be a good way of associating descriptions or patterns with the classes of individuals that are discovered by a clustering process. In this way a description in terms of attribute and ranges of values could be attached to the discovered clusters and complete the definition of the set of individuals which are covered. This could be reused in ontology engineering for example, and as well in numerous tasks where clustering is heavily used at the moment.
Initially, a uniform distribution over H is defined with a pseudo-count ε over the set of patterns H, i.e., the probability of h 0 is given by P (h 0 ) = ε ε·|H| . Then, during the process of transmitting/receiving messages the pattern probabilities and lengths are updated w.r.t. the patterns observed so far.
At each single step, the distribution P over H is multinomial with parameters (θ 1 , . . . , θ |H| ), where θ i corresponds to a pattern h i ∈ H. With the lower indices we arbitrarily enumerate patterns in H. The upper indices denote the sequence number of patterns in the transmitting sequence. Further, we will see that the order of patterns in the sequence h 1 , . . . , h n does not affect the length of the encoded sequence. This length depends only on the number of times each pattern appears in the sequence.
Taking into account the initial probabilities, the maximum-likelihood estimates of the parameters of the multinomial distribution, given the sequence H n = h 1 . . . h n , are the following: where usg(h|h 1 . . . h n ) is the number of occurrences of pattern h in the sequences observed so far (up to the n-th pattern inclusive). The ML estimates from Equation 4 are equivalent to the probability estimates of a pattern h based on its frequency in H h with Laplace smoothing having parameter ε (Manning et al., 2008). Thus, taking as the probability model the multinomial distribution with the parameters estimated according to the maximum likelihood principle, the plug-in probability of the n-th pattern in the sequence H n is given by Combining together Equations 4 and 5 we obtain the following probability of the n-th pattern h n ∈ H in the pattern sequence H n : where usg(h) is the number of patterns in H n , and usg(H) = h∈H usg(h) is the length of the sequence, i.e., the total number of occurrences of patterns from H. Then, the code length of h n is given as follows: The length l(h n ) can be interpreted as the sum of the log loss of the prediction errors made by sequentially predicting h i based on the predictor in the family of multinomial distributions over H that would have been the best for sequentially predicting the previous patterns h 1 , . . . , h i−1 .
The results given in Fig. 9 show that a very coarse discretization is less suitable for Mint, since the compression ratio and the number of patterns is the largest (worst).  For fine discretized datasets the number of neighbors does no not affect a lot the results. It appears that with a large number of discrezited intervals, the results of Mint is less affected by the chosen heuristics. Taking into account the Fig. 11 The results of IPD discretization for the synthetic data running time, the best (and the most "stable") results are achieved by splitting the attribute range into |G| intervals and by taking |G| nearest neighbors to compute pattern candidates.
We study how useful is the pruning strategy for reducing the compression ratio and the number of patterns, and measure how much time it takes. The results presented in Fig. 10 show that the pruning strategy is useful for mining hyperrectangles in datasets with a coarse discretization. For fine discretized datasets, the compression ratio and the number of patterns reduce only slightly.

Appendix D Visualization of some hyper-rectangles for synthetic data
In this section we give some examples of the hyper-rectangles discovered by Slim, Mint, and RealKrimp. As it is mentioned above, uniform boundaries used for an itemset miner such as Slim) may provide poor results, i.e., the boundaries of the hyper-rectangles can be very imprecise. And this is especially the case for the IPD discretization. Actually IPD returns MDL-selected boundaries which are selected more for the overall distribution of points rather than for specific patterns. The results of IPD are given in Fig. 11. The figure shows that IPD, especially for sparse data, provides quite imprecise boundaries. But even for dense data, the boundaries Fig. 12 The patterns selected by Mint and Slim (they are the same) for IPD-discretized dataset "Simple" where support of each ground truth pattern is equal to 100 Fig. 13 The patterns selected by Mint and Slim (they are the same) for IPD-discretized dataset "Complex inclusion" where support of each ground truth pattern is equal to 700 are not very well aligned to the ground truth patterns. Then we cannot expect good results for Slim and Mint when they are applied to IPD-discretized data.
Let us consider the patterns computed by Slim and Mint based on IPDdiscretized data. Our experiments show that for the synthetic data Slim and Mint return quite similar patterns (see Fig. 12 and 13). We do not consider the IPDdiscretized datasets further, since for the remaining datasets the anticipated results can be derived from the discretization grid given in Fig. 11.
Due to limited space, we show patterns for randomly chosen datasets in Fig. 14-18. The ground truth patterns are highlighted in different colors in Fig. 7. As we can see Slim returns usually very imprecise patterns. This is a typical limitation of itemset mining methods applied to numerical data.
RealKrimp returns patterns with much precise boundaries, however a lot of patterns are almost the same. For example, for "Simple" dataset, Fig. 14, some patterns generated by RealKrimp are very redundant and imprecise. The patterns returned by Mint are much more precise. They are non-redundant, however there are patterns with imprecise boundaries (the 5th and the last one). The 1st pattern describes only a fragment of the ground truth pattern.
For dataset "Simple inclusion", Mint returns two patterns that correspond exactly to the ground truth patterns and the remaining three patterns describe the third pattern. Nevertheless, their union gives a quite correct pattern. RealKrimp also distinguishes only 2 patterns correctly. However, it returns a lot of similar patterns. It is important to notice that for this pattern set it is hard to find a combination of patterns that allows for reconstructing the third pattern. Thus, in the case of RealKrimp, redundant patterns pose a greater problem than in the case of Mint.
The conclusion similar to the previous one, can be drawn for Fig. 16 and 17. Both Mint and RealKrimp return patterns aligned to the ground truth patterns, however, the pattern sets returned by Mint are much less redundant, while Re-alKrimp returns very similar patterns such that without knowing the ground truth it might be hard to choose those that are the closest to the correct ones. The last case that we consider is given in Fig. 18. It contains a sparse pattern that Mint and Slim are unable to describe, while RealKrimp can easily do that. As we can see from the figure, instead of a sparse hyper-rectangle, Mint returns a cover of the dense region around this pattern. It is the limitation of Mint. RealKrimp return a simple description -the exact sparse pattern-as well as two noisy patterns.  (5) (c) RealKrimp (sampling of size 0.5|G|) Fig. 18 The results of pattern mining for "Inverted" dataset, the number of data points is 200