dataesr/scientific-paragraphs-categorization huggingface dataset:
Fig. 1  illustrates their respective geographic scopes. The dark gray area corresponds to RM while the black area corresponds to RMC. White line separations in the figure correspond to the different watershed delimitations. Several dimensions of analysis have been collected. Fig. 2  illustrates the dimensions of analysis of the database: physico-chemistry, hydrobiology, climate, land use, hydrology and hydromorphology. The 11,329 sampling sites are described by these 6 dimensions. The objective is to provide researchers with a maximum amount of data to analyze. It aims at facilitating studies that focus on the relations between various environmental aspects, or the impact of one aspect on another one. Furthermore, some of these different environmental aspects involve a temporal dimension. For example, physico-chemical parameters may be sampled every two months in sampling sites.
Considering the different hydro-ecological parameters with their temporal dimension allows the application of original methods. Indeed, some temporal Identifying these links is important to evaluate more precisely the impact of physico-chemistry on biology. Finding temporally ordered sets of physico-chemical parameter values may help to highlight the synergy produced by their combination. The presented method proposes an original temporal pattern based approach, called discriminant closed partially ordered patterns, to obtain these correlations. In Section 2, we present existing approaches from the literature. In Section 3, we describe our method divided into three parts: 1. Section 3. 1 details the preprocess operations performed on the dataset, and the construction of quality class sub-datasets that correspond to each bio-index.
(2009)  rely on Formal Concept Analysis to study biological traits of macrophytes taxa in Rhin-Meuse watershed. The goal is to link environmental variables with biological trait granularity in order to identify groups of taxa adapted to a particular environmental context. State-of-the-art methods show the importance of considering and combining biological and physico-chemical variables in order to find relevant knowledge. Nevertheless, none of these studies has taken into account the temporal aspect based on temporal pattern mining approaches, which is relevant to analyze pollution dynamics. The approach presented in this study is well-adapted to temporal datasets.
Let us consider a temporal dataset and a sequential pattern 〈(Low oxygen level)(Disappearance of species)〉 : 30 % extracted from the transactions of this dataset. This sequential pattern means that the Low oxygen level event is temporally followed by the Disappearance of species event with a frequency of 30% in the dataset. A transaction is represented by a sequence of elements ordered on the temporal dimension. Mining such features according to the temporal aspect is very useful for specialists in various domains such as software engineering  (Ren et al. , 2009) , medicine  (Sallaberry et al. , 2011)  and marketing  (George and Binu, 2012). Despite their advantages, sequential patterns often bring limited information since they only provide totally ordered information about data. To illustrate this, let us consider a second pattern 〈(Presence of pesticides)(Disappearance of species)〉 : 30 % discovered in the same dataset.
It is possible to extract the two patterns exactly from the same set of transactions: they coexist in the dataset. The coexistence of sequential patterns is not taken into account with this method. However, this coexistence can be synthesized based on partial ordering. Fig. 4  presents a so-called partially ordered pattern that combines the two previous sequential patterns. This partially ordered pattern means that the Disappearance of species event is frequently preceded by two events Low oxygen level and Presence of pesticides, which themselves are not ordered. Partially ordered pattern approaches used on hydrobiological data have some advantages: 1. They are well-adapted to the temporal aspect of the dataset. 2. They provide more information on order among elements than sequential patterns.
Physico-chemical data Physico-chemistry is the measurement of various physico-chemical parameters. We can mention for example the measurement of temperature, oxygen levels, analysis of elements such as nitrates and phosphorus or the presence of molecules such as synthetic pesticides and hydrocarbons. As we explain below in the preprocess of the data, these parameters are treated by family rather than individually because of their large number. The Fresqueau dataset gathers more than 900 physico-chemical parameters. Table  1  gives an example of biological and physico-chemical samplings on the two sampling stations of ) and total phosphorus (P) are representative of the level of phosphorous matter in water. In our illustrative example, we only consider the IBGN bio-index which characterizes the macro-invertebrate dimension.
Some macro-invertebrate taxa are for instance typical of a good river quality, denoted as polluo-sensitive, while some other taxa are not. Then, a high abundance of polluo-sensitive taxa often leads to a good IBGN score. These biological samplings are done once a year for each site. In the dataset, a value of 2. 331 mg/l NH 4 + is for example sampled on July 2004 for Site 2 and an IBGN score of 8/20 is measured two months later on September 2004 in the same sampling site. The Fresqueau dataset only contains numerical values. Patternbased methods only perform on discrete data. We now present the discretization process based on domain knowledge.
Data discretization To process the dataset with pattern-based approaches, each physico-chemical or biological variable needs to be discretized. Instead of choosing arbitrary intervals, we base our discretization on existing works in hydrobiology. Indeed, French water agencies published technical reports that provide quality intervals for biology and physico-chemistry. For both parameter categories, there are five quality values related to the river quality: "Very good", "Good", "Medium", "Bad" and "Very bad" represented by colors Blue, Green, Yellow, Orange and Red, respectively. In the following, a quality value for a parameter is called a quality class. The bio-index quality classes are given by AFNOR standards of bio-indices (AFNOR (Association Française de NORmalisation), 1992, révision 2004 for IBGN, AFNOR (Association Française de NORmalisation), 2000, révision 2007 for IBD and AFNOR (Association Française de NORmalisation), 2004 for IPR).
Physico-chemical discretization The number of physico-chemical parameters is huge. The SEQ-eau Standard allows us to significantly reduce this number of parameters by providing 15 macro-parameters that group the initial ones. These macro-parameters are relevant since they group parameters in families according to their nature or their function (as phosphorus, organic matters, pesticides, …). Given a macro-parameter, the process consists in computing the discretized quality class for each included parameter to 1 2 Fig. 5. Hydro-ecological network example. 20, 17]  ]17, 13]  ]13, 9]  ]9, 5]  ]5, 0]  assign the worst quality class to the macro-parameter. Table  3  provides the two macro-parameters related to the five physico-chemical parameters illustrated in the initial dataset in Table  1. For example with an orthophosphate (PO 4 3- ) value of 0.
Given the discretization table, NKJ value is discretized as a Blue quality class and NO 2 -value as a Green quality class, then the macroparameter AZOT value has a Green quality class. Based on the initial dataset in Table  1 , Table  4  gives us the discretized dataset obtained by grouping parameters. We can note that the number of variables decreases in this new dataset: based on Table  3 , NH 4 + , NKJ and NO 2 -parameters are reduced to the AZOT macro-parameter while PO 4 3-and P parameters are reduced to the PHOS macro-parameter. Applying AFNOR and SEQ-eau standards has several advantages: 1. The discretization process is based on domain knowledge instead of an arbitrary number of intervals. 2. It significantly reduces the initial dataset variables by providing macro-parameters. 3. It avoids some missing values since only one variable is needed to be able to compute the corresponding macro-parameter.
Sequence preprocessing The aim of this step is to build sequences by ordering measure samplings according to their timestamp. Pattern mining approaches consider items, which would be in our case the physico-chemical and biological measures. An itemset IS is a non-ordered group of measures sampled at a same timestamp. A sequence S = 〈IS 1 IS 2 … IS |S| 〉 is a non-empty and ordered list of itemsets, i. e. groups of measures ordered according to their timestamp. For each river site, a sequence is built according to all discretized variables of the dataset in Table  4. Table  5  presents these sequences. Let us consider the river Site 1, there are a Green quality class PHOS at timestamp 02/07, a Blue quality class AZOT at timestamp 06/07, a Green quality class AZOT and a Blue quality class PHOS at timestamp 07/07.
Thus Site 1 sequence starts with the sequence 〈(PHOS Green )(AZOT Blue )(AZOT Green , PHOS Blue )〉. It means that item PHOS Green is temporally followed by item AZOT Blue , itself followed by the two items AZOT Green and PHOS Blue. Given the dataset of sequences, we now present the next step that cuts sequences in order to construct specific biological quality class sub-datasets.
Quality class sub-datasets At this step, the obtained sequence dataset is not yet easily explorable to link physico-chemistry with biology. Site sequences are often long since they cover many years of samplings. For a same sampling site, a good biological value may be measured at a given timestamp and a bad biological value may be measured at another timestamp. Thus, a sampling site sequence may describe different water quality episodes over the time. Furthermore, given a biological measured value, considering physico-chemical values measured some years before is not relevant. Then a timeconstraint is necessary to avoid or limit non-sense knowledge. To tackle those issues the idea is as follows, the sequence dataset is transformed into quality class sub-datasets composed of sequences for each bio-index, where each sequence represents a water quality episode from sequences of sampling stations.
A quality class sub-dataset corresponds to a given quality class of a bio-index, for example the value green for the IBGN. It means that for IBGN bio-index, there are five quality class sub-datasets representing a different discretized IBGN value (Blue, Green, Yellow, Orange or Red). In the dataset in Table  5 , discretized bio-index values are included as variables in sequences. Then to manage bioindices to build different datasets, we have to cut initial sequences in sub-sequences for each bio-index quality value. For example, given the value IBGN Blue , it consists in collecting all sub-sequences in the dataset of sequences that precede an item IBGN Blue given a chosen time interval represented by a window. We illustrate this step by cutting sequences from the discretized dataset in Table  4.
In this dataset, the IBGN bio-index has three different values: Blue, Yellow and Orange. Thus we obtain three quality class sub-datasets IBGN Blue , IBGN Yellow and IBGN Orange. The selected temporal interval is equal to 6 months. It collects all discretized physico-chemical variables that appear in this interval before a discretized bio-index quality class. This process is illustrated in Table  6  where biological index values are framed, and not collected variables are blurred. For example, the first PHOS Green item from Site 1 sequence is not collected since it is sampled 7 months before the first IBGN measure. Then according to this process, we build the sub-datasets in Table  7 , where each IBGN quality class is composed of the set of sub-sequences that precede its measurement. For easier understanding of the following section with a more complete example, we add some new sub-sequences in Table  7  that do not exist in Table  5.
We can now use this IBGN dataset to mine DCPO-patterns. The following section presents our temporal pattern based method. (mg/l) [0,0. 1[ [0. 1,0. 5[ [0. 5,2[ [2,5[ [5,∞] NKJ (mg/l) [0,1[ [1,2[ [2,4[ [4,10[ [10,∞] NO 2 -(mg/l) [0,0. 03[ [0. 03,0. 3[ [0. 3,0. 5[ [0. 5,1[ [1,∞] PHOS PO 4 3-(mg/l) [0,0. 1] [0. 1,0. 5[ [0. 5,1[ [1,2[ [2,∞] P (mg/l) [0,0. 05[ [0. 05,0. 2[ [0. 2,0. 5[ [0. 5,1[ [1,∞].
Pattern extraction This step is the core of our proposition. It consists in extracting closed partially ordered patterns by quality class sub-dataset. In the general case, extracting closed partially ordered patterns is a complex task, because on real datasets the search space is often huge. It is related to combinatorial problems and pattern extraction approaches are all based on the same fundamentals. We use the algorithm OrderSpan that we proposed in  Fabrègue et al. (2013)  and we adapted it for mining multiple quality class sub-datasets. Initially, OrderSpan is only able to mine a single dataset. The trick is to mine iteratively DCPO-patterns for each quality class sub-datasets, while the non-discriminant DCPOpatterns are removed in a post process, as detailed below. A pattern is characterized by a support, or a frequency, that represents the number of sequences in which the pattern appears.
In the case of closed partially ordered patterns, a pattern appears in a sequence (or is supported by a sequence) if the order between all elements in the pattern is also observed in the sequence. Let us consider the partially ordered pattern in Fig. 6. This partially ordered pattern is supported by all sequences from quality class sub-dataset IBGN Orange and none from quality class subdataset IBGN Blue. Indeed, in all sequences from quality class sub-dataset IBGN Orange , items AZOT Orange and PHOS Orange both appear and are followed by item AZOT Green. Conversely, AZOT Orange and PHOS Orange are ordered differently in the sequences. Thus, this pattern has a support of 2 and a frequency of 2/2 in quality class sub-dataset IBGN Orange. In order to limit the search space a minimum frequency parameter noted θ is required as algorithm parameter.
Given a θ value, it means that all extracted partially ordered patterns have a frequency higher than θ. In our case, we have to mine multiple quality class subdatasets in parallel since each quality class sub-dataset is considered as an independent sequence dataset. It consists in extracting all partially ordered patterns whose support is higher than a minimum frequency θ in the concerned quality class sub-dataset. In addition, we retrieve the frequency of partially ordered patterns in other quality class subdatasets. Then, each mined partially ordered pattern has multiple frequencies. For example, the partially ordered pattern in Fig. 7  has a frequency of 0/2 (support of 0) in quality class sub-dataset IBGN Blue , 1/3 in quality class sub-dataset IBGN Yellow and 2/2 in quality class subdataset IBGN Orange.
This pattern can be mined from IBGN Yellow quality class sub-dataset with θ ≤ 1/3 or from IBGN Orange quality class subdataset with θ ≤ 2/2. Furthermore, we only consider partially ordered patterns that are closed, i. e. CPO-patterns. The closure property allows us to extract a smaller set of patterns without information loss. This property works on the following principle: given a partially ordered pattern P and S the set of sequences that support it, if there is no other partially ordered pattern P′ such that P′ is more specific than P and P′ supported by all sequences in S, then P is closed. More details about this property are provided in  Fabrègue et al. (2013). For example, the partially ordered pattern in Fig. 6  is not closed since we point out that each time this pattern is supported by a sequence, at the same time we observe a PHOS Yellow item.
Discriminant patterns filtering This step is a filtering process on extracted partially ordered patterns. For each quality class sub-dataset, not all extracted closed partially ordered patterns are meaningful and relevant. We opted to adapt the Growth Rate interestingness measure. Growth Rate had been first used in emerging pattern mining  (Dong and Li, 1999)  and is defined by Definition 1. Definition 1. Given a closed partially ordered pattern P and two quality class sub-datasets C 1 and C 2 , the growth rate of P in C 1 with respect to C 2 , denoted GR(P, C 1 , C 2 ), is defined as 0; if Freq C 1 P ð Þ ¼ 0 and Freq C 2 P ð Þ ¼ 0 ∞; if Freq C 1 P ð Þ≠0 and Freq C 2 P ð Þ ¼ 0 Freq C1 P ð Þ Freq C 2 P ð Þ ; otherwise: 8 > > < > > : ð1Þ A growth rate greater than 1 in a quality class sub-dataset C 1 with respect to another quality class sub-dataset C 2 means that the partially ordered pattern is more frequent in C 1 than in C 2.
PHOS Orange Fig. 6. A partially ordered pattern example. environmental markers for each biological quality class sub-dataset. Nevertheless, the growth rate measure defined in the literature is not adapted for a number of quality class sub-datasets higher than two. It is only possible to apply the measure on a quality class sub-dataset with respect to another. We then propose a generalized growth rate that considers multiple quality class sub-datasets (Definition 2). Definition 2. Given a closed partially ordered pattern P, a quality class sub-dataset C and a set of quality class sub-datasets C 1 ; C 2 ; …; C n f g , the generalized growth rate of P in C with respect to C 1 ; C 2 ; …; C n f g , denoted GGR P; C C 1 ; C 2 ; …; C n f g ð Þ , is defined as 0; Freq C P ð Þ ¼ 0 and max Freq C1 P ð Þ; Freq C2 P ð Þ; …; Freq C n P ð Þ ¼ 0 ∞; if Freq C P ð Þ≠0 and max Freq C1 P ð Þ; Freq C2 P ð Þ; …; Freq C n P ð Þ ¼ 0 Freq C P ð Þ max Freq C1 P ð Þ; Freq C2 P ð Þ; …; Freq C n P ð Þ ; otherwise: 8 > > > > > < > > > > > : ð2Þ This generalized definition leads to compute the growth rate of a pattern in a quality class sub-dataset C with respect to the maximal frequency in a set of other quality class sub-datasets.
Retrieving the maximal frequency of a pattern P in other quality class sub-datasets ensures that with a generalized growth rate greater than 1 in C, the frequency of P in C is higher than its frequency in all other quality class sub-datasets, thus P is discriminant in C. For example, given a minimum frequency θ = 30%, the closed partially ordered pattern in Fig. 7  is extracted from quality class sub-datasets IBGN Yellow and IBGN Orange with a frequency of 1/3 and 2/2 respectively. This closed partially ordered pattern is removed from quality class sub-dataset IBGN Yellow since it is more frequent in quality class sub-dataset IBGN Orange. We note that with the generalized growth rate measure, a DCPO-pattern cannot be discriminant in two quality class sub-datasets simultaneously. In several pattern mining applications, the amount of extracted patterns may be huge with thousand or millions of extracted patterns.
Interestingness measures and pattern selection To solve the problem of the huge number of patterns, we define a method to filter the k most interesting DCPO-patterns for analysis. We then define the notion of interestingness specific to this work. After some preliminary tests and discussions, we have identified three different relevant aspects on DCPO-patterns: The ideal result is a small set of DCPO-patterns that are the most frequent and the most discriminant, while they retrieve a viewpoint on the diversity in the data. Nevertheless, selecting such a small subset in thousands of DCPO-patterns is not an easy task. We illustrate this issue by projecting information about extracted DCPO-patterns from quality class sub-dataset IBGN Red (Fig. 8 ). This projection is obtained by performing a multidimensional scaling approach  (Brog and Groenen, 1997 ) that aims at modeling dissimilarity among pairs of objects into points in a low-dimensional geometric space.
These points can be represented graphically and visualized afterwards. For our purpose, points represent DCPO-patterns and the dissimilarity measure is the Hamming distance  (Hamming, 1950)  (explained below). In this two dimension space, each circle represents a discriminant DCPO-pattern: its diameter is proportional to the frequency of the DCPO-pattern while its darkness is proportional to the discriminance (generalized growth rate value). Two circles far from each other mean that the corresponding DCPO-patterns are supported by different sequences of the dataset, thus they probably contain a different information. The Hamming distance is used to compute the distance between two DCPO-patterns according to the set of sequences supporting them. For example, a dataset of six sequences can be represented with a binary code.
A DCPO-pattern with the binary code 011101 means that it is supported by all sequences of the dataset except the first and the fifth sequences (1 when the DCPO-pattern is supported, 0 otherwise). The Hamming distance between two binary codes is the number of bits that differ. Then, the Hamming distance between binary codes 010101 and 011100 is 2 because they differ at the third and the sixth indices. In the projection, we observe that the most frequent DCPOpatterns are rarely the most discriminant and vice versa. Furthermore, many DCPO-patterns are grouped into clusters (almost three in the example). It means that in the result set, a lot of DCPO-patterns are mostly supported by the same sequences of the dataset. Given this big set of DCPO-patterns, the aim is to select the k top interesting DCPO-patterns.
We have first tried two selection approaches based on the k most frequent and on the k most discriminant DCPOpatterns. Based on the extracted DCPO-patterns from quality class sub-dataset IBGN Red and their projection in Fig. 8 , we selected and projected the 20 top DCPO-patterns according to their frequency (Fig. 9a ) and the 20 top DCPO-patterns according to their discriminance (Fig. 9b ). Based on Fig. 8 , all the unselected DCPO-patterns in Fig. 9a  and b are grayed. Selecting the most frequent DCPO-patterns leads to select the most common DCPO-patterns in the dataset. We observe that DCPO-patterns contained in the dense clusters are not selected. DCPO-patterns in clusters are in majority less frequent but their darkness means that they have a high generalized growth rate and are very discriminant.
Combination of the dimensions of analysis To tackle this issue, we choose to combine the distance, the generalized growth rate and the frequency. Given the set P of unselected DCPOpatterns and the set SP of already selected DCPO-patterns, aim is to compute a score of interestingness between 0 and 1 for each P ∈ P. Then, the DCPO-pattern P with the highest score is added to the set of selected DCPO-patterns SP. To give exactly the same weight to the three dimensions, we have normalized the generalized growth rate measure and the Hamming distance to calculate a value between 0 and 1 for the two measures. The frequency is already a score between 0 and 1, i. e. a frequency equal to 0. 2 corresponds to a DCPO-pattern supported by 20% of the dataset. Our balanced measure is denoted PB_Index for Pattern Balance Index.
Given the set P of unselected DCPO-patterns and the set SP of already selected DCPO-patterns, for each P ∈ P the measure is defined as follows: with NMH(P; SP) the minimal normalized Hamming distance between P and the set of patterns SP (this distance is equal to 1 when the set of selected DCPO-patterns is empty), Freq(P) the frequency of P and NGGR(P) the normalized generalized growth rate of P in the considered quality class sub-dataset. In the numerator, the multiplication between each dimension of analysis allows us to penalize DCPO-patterns for which the value for one or more dimensions is low, thus a selected DCPO-pattern is balanced between dimensions, i. e. each dimension is considered as important. The multiplicative factor 3 is for normalization, i. e. obtaining a score between 0 and 1.