{'fraction_non_alphanumeric': 0.04019743336623889, 'fraction_numerical': 0.0034353405725567623, 'mean_word_length': 4.0804413239719155, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Similarity Based Granules

In the authors’ previous research, a possible usage of the correlation clustering in rough set theory was investigated. Correlation clustering is based on a tolerance relation and its output is a partition. The system of granules can be derived from the partition and as a result, a new approximation space appears. This space focuses on the similarity (represented by a tolerance relation) itself and it is different from the covering type approximation space relying on a tolerance relation. In real-world applications, the number of objects is very high. So it can be effective only if a portion of the data points is used. Previously we provided a method that chooses the necessary number of objects that represent the data set. These members are called representatives and it can be useful to apply them in the approximation of an arbitrary set. A new approximation pair can be defined based on the representatives. In this paper, some very important properties are checked for this approximation pair and the system of granules.


Introduction
Nowadays a huge amount of data is stored in databases. The stored data is usually represented by objects with (maybe different) properties. Properties are handled in two steps: attributes and the corresponding attribute values. Generally, a finite number of attributes and a finite number of the corresponding attribute values are used. Usually, there are more objects than attribute values. Therefore, more than one object may have the same attribute values (not considering the IDs), so they are indiscernible based on the available knowledge. Naturally, indiscernible objects have to be treated in the same way. Pawlak's original system of rough sets shows the consequences of indiscernibility. In many practical cases, not only indiscernible objects have to be treated in the same way, but objects with the same attribute values of some (and not all) attributes. This is one of the theoretical bases of the generalizations of Pawlak's original theory. Some objects have to be treated in the same way. In rough set theory the objects, that are treated in the same way, belong to a base set. In our previous study, we examined whether the partition, generated by correlation clustering, can be considered as the system of base sets in an application. Correlation clustering is a clustering method in data mining which creates a partition of the input data set based on a tolerance relation (representing similarity). The clusters gained this way contain similar objects. In our previous paper [11,12] we showed that it is worth to generate the system of base sets from the partition. This way, the base sets contain objects that are typically similar to each other and the generated approximation space (similarity based rough sets) possesses several very useful properties. Informally, in granular computing a granule contains objects which have to be treated in the same way. Granules play-as the most fundamental concept-a crucial role in granular computing. It means that granules (and not objects belonging to them) are in the focus of investigations. The clusters generated by the correlation clustering can be considered as granules. In order to use granules, one has to give their names. In order to preserve the connection between a granule and its objects, the name of the granule can be an object belonging to the granule. This object can represent the given granule. In a very general case to choose representatives is not a trivial problem. In the case of a system relying on an indiscernible relation any object of a granule can be its name, can represent the corresponding granule. When similarity (represented by a tolerance relation) is used to get granules, then the method of correlation clustering gives a possibility to define representatives [5,10]. In [10] a new approximation pair is proposed that is completely based on the representatives. Professor Mihir Chakraborty proposed some very important properties of granules (presented at the International Workshop on Modern and Unconventional Approaches to Reasoning and Computing in 2017). In this paper, we examined these properties along with some other ones for our introduced granules. We also show that the clusters gained from the correlation clustering satisfy all the minimal properties of the granules. Therefore, the clusters can be really treated as granules. The structure of the paper is the following: we begin by introducing the theoretical background of rough set theory. In Sect. 3 correlation clustering is defined. In Sect. 4 we present our previously introduced approximation space. In Sect. 5 we show the definition of the approximation pairs that are based on the representatives. After this, we show which of the defined properties hold for the proposed approximation pair. Finally, we conclude the results.

Theoretical Background
From the granular point of view a Pawlakian approximation space [13][14][15] is an ordered 5-tuple U, G, D, l, u generated by an equivalence relation R (which represents indiscernibility), where: -U = ∅ is the universe of objects -G is the set of granules for which the following properties hold: , and x, y ∈ G if xRy} -D is the set of definable sets which can be given by the following inductive definition: -The functions l, u form a Pawlakian approximation pair l, u if the followings are true for an arbitrary set S ⊆ U :

Correlation Clustering
Cluster analysis is an unsupervised learning method in data mining. The goal is to group the objects so that the objects in the same group are more similar to each other than to those which are in other groups. In many cases, the similarity is based on the attribute values of the objects. Although there are some cases when the properties of objects can be difficult to be quantified, but something about their similarity or dissimilarity can still be said. For example, let's consider the humans. We cannot describe someone's looks using only a number, but we can make simple statements on whether two people are similar or dissimilar. These opinions are dependent on the person making the statements. Someone can say that two people are similar while others treat them as dissimilar. If we want to formulate the similarity and dissimilarity using mathematics, we need a tolerance relation (i.e. a reflexive and symmetric relation). If this relation holds for two objects, we can say that they are similar. If this relation does not hold, then they are dissimilar. This relation is reflexive because every object is similar to itself. It is also symmetric because if some object is similar to another one, then the similarity is equivalent the other way round. However transitivity does not necessarily hold. If we take a human and a mouse, then due to their inner structure they are considered similar. This is the reason mice are used in many drug experiments. A human and a mannequin are also similar, this time according to their shape. This is why these dolls are used in display windows. However, a mouse and a mannequin are dissimilar (except that both are similar to the same object). Correlation clustering is a clustering technique based on a tolerance relation [6,7,17]. The task is to find an R ⊆ U × U equivalence relation which is closest to the tolerance relation. A (partial) tolerance relation R [8,16] can be represented by a matrix M . Let matrix M = (m ij ) be the matrix of the partial relation R of similarity: m ij = 1 if objects i and j are similar, m ij = −1 if objects i and j are dissimilar, and m ij = 0 otherwise.
A relation is called partial if there exist two elements (i, j) such that m ij = 0. It means that if we have an arbitrary relation R ⊆ U × U we have two sets of pairs. Let R true be the set of those pairs of elements for which R holds and R false be the one for which R does not hold. If R is partial, A partition of a set S is a function p : S → N. Objects x, y ∈ S are in the same cluster at partitioning p, if p(x) = p(y). For a conflict one of the following two cases holds: -Two dissimilar objects end up in the same cluster -Two similar objects end up in different clusters The cost function is the number of these disagreements. The formal definition can be seen in [11]. For a relation, the partition with the minimal cost function value is called optimal. Solving a correlation clustering problem is equivalent to minimising its cost function for the fixed relation. If the cost function's value is 0, the partition is called perfect. Given the R and R we call the value f the distance of the two relations. With this definition, the partition generates an equivalence relation. This relation can be considered to be the closest to the tolerance relation.
It is easy to check that we cannot necessarily find a perfect partition for an arbitrary similarity relation. Consider the simplest such case, given three objects A, B and C, and A is similar to both B and C, but B and C are dissimilar. In this situation, the following 5 partitions can be given: It is easy to see that in every of one them there is at least 1 conflict. The number of partitions can be given by the Bell number [1], which grows exponentially. So the optimal partition cannot be determined in reasonable time. In a practical case a quasi optimal partition can be sufficient, so a search algorithm can be used.
The main advantage of the correlation clustering is that the number of clusters does not need to be specified in advance like in many clustering algorithms, and this number is optimal based on the similarity. However, as the number of partitions grows exponentially it is an NP-hard problem.

Similarity Based Granules
The system of granules is based on the background knowledge embedded in an information system. The granules represent the background knowledge (or its limit). In the Pawlakian systems, two objects are treated as indiscernible if all of their known attribute values are the same. The indiscernibility property can be represented by an equivalence relation. In practical applications not only the indiscernible objects must be handled in the same way but also those that are similar to each other based on some property. (Irrelevant differences for the purpose of the given applications should not be taken into account.) Some covering approximation spaces use tolerance relations, which represent similarity, instead of equivalence relations, but the usage of these relations is very special.
It emphasizes the similarity to a given object and not the similarity of objects 'in general'. This means that a granule contains objects which are similar to a distinguished object. In these systems, each object generates a granule. With correlation clustering, a quasi-optimal partition of the universe can be obtained [2][3][4]. The members of a partition are called clusters. They contain objects that are typically similar to each other and not just to a distinguished member. In our previous research, we investigated if the partition can be understood as a system of granules [9,11,12]. According to our results, it is worth to generate a partition with correlation clustering. Singleton clusters represent very little information (its member is only similar to itself). Without increasing the number of conflicts its member cannot be considered similar to any objects. So, they always require an individual decision. By deleting the singletons, a partial system of granules can be defined. The formal definition of the proposed approximation space (similarity based rough sets) can be seen in the following definition.
The introduced approximation space has some useful features: -the similarity of objects relying on their properties (and not the similarity to a distinguished object) plays an important role in the definition of granules; -the system of granules consists of disjoint sets, so the lower and upper approximations are closed in the following sense: Let S be a set and x ∈ U . If x ∈ l(S), then we can say, that every object y ∈ U which is in the same cluster as x is in l(S). If x ∈ u(S), then we can say, that every object y ∈ U which is in the same cluster as x is in u(S). -the number of clusters is not predefined because the algorithm finds the optimal number. This way, only the necessary number of granules appear (in applications we have to use an acceptable number of granules); -the size of the granules is not too small, nor too big.
The amount of daily produced data is unbelievable. There are around 2.5 quintillion bytes of data created each day at our current pace and it is only accelerating with the growth of the Internet of Things (IoT). In data sciences, it is extremely important that certain methods can be used for a large amount of data. Due to the exploding volume and speed of data growth, the resource need and execution time of the algorithms show an increasing trend. In data mining to mitigate this problem, it is common to use samples. There are numerous ways to choose a part of the input dataset which can be treated as a sample. In every method, it is crucial that the chosen objects must represent the entire population. In this case, representativeness means that the specific properties are as similar in the sample as in the entire set. Without this property, important information might be disregarded. Imagine that a product is needed to be sold, for example, a toy to a group of children. In almost every group of youngsters, there is at least one child whose decision has the most influence on the group's life. In this case, one child is enough to be found and convinced to buy the toy. The rest of the group will follow them. This child can be treated as the representative of the group. It means that in the computations only this child should be considered instead of the whole group. In a pawlakian system, any object can be the representative of a certain granule. In the covering systems (based on a tolerance relation) the representatives are obvious in each granule. In the similarity based rough set approximation space, the situation is not that simple. In each granule, we need to choose an object that is the most similar in the set. Naturally, it can happen that the entire granule cannot be represented by only one member. In [5] we proposed an algorithm that produces the necessary number of representatives for each granule. The algorithm assigns a rank value to each object. This value shows how much the given object represents the granule.

Definition 2. The object with the highest rank value is called primary representative. If there is more than one object with the same rank, then the primary representative is chosen randomly.
Generally speaking, we can say that a granule represents a property. A represented property can be characterized by attributes and the corresponding attribute values. For example, the property 'being red apple' can be characterized by color and fruit type as attributes and by red and apple as corresponding attribute values. If P is a property, then P can be an intension of a granule G. The granule itself is a set of objects that possess the property described by its intension. In our system, a granule contains objects that are typically similar to each other. Every granule has a primary representative which represents the entire granule the most. In an information system, every object has attributes and attributes values. The list of these attribute values describes a certain property.

Approximation Based on Representatives
In the classical sense, the lower approximation of a set S is the union of those granules that are subsets of S. In order to get these granules, every object in each granule must be considered. It can be a time-consuming task if the number of points is high. The effectiveness of the representatives lies in situations when the number of objects is very large. It can be practical to use the strength of representatives in the approximation process. For each granule, let us consider only its representatives. Let G ∈ G be a granule, and REP (G) be the set of its representatives such that REP (G) ⊆ G and REP (G) = ∅ for all G ∈ G (and so ∅ / ∈ G). The approximation pair are defined as the following: This way, the lower approximation of a set S becomes the union of those granules for which every representative is a member of S. A granule belongs to the upper approximation if at least one of its representatives is in the set S. Naturally, the certainty of the lower approximation might be lost, but as the number of points is increasing, it can be very useful.
In Fig. 1 a simple example is provided for the method. The granules are denoted by solid-line rectangles, and the set we wish to approximate (S) is denoted by a grey ellipse. For each granule, the black circles symbolise the representatives.
The approximation of the set S is the following based on the representatives: The approximation of the set S is the following based on the classical approximation pair: The lower approximation is the same in both cases. The upper approximation differs in one granule (G 5 ). When there is a huge number of points and there are several sets to be approximated, we recommend approximation using representatives. In this case, the method can reduce the run-time of the approximation significantly. Determining the approximation with the classical functions 32 objects needed to be considered. Using the proposed method, only 13 of them had to be tested, so almost 60% of the original points were discarded. Of course, with 32 to 13 points is not a significant change, but in the case of millions of objects, it can be very useful. Working with only the representatives, we can always save time and resources because we can be sure that the number of representatives is less than that of U . Proving this is very straightforward. Naturally, there cannot be more representatives than objects in the universe. Their numbers cannot be equal either because it could only happen if every object were a representative which implies that every cluster were singleton. Using these system is pointless because the system of granules is empty (every singleton cluster is discarded).

Properties of Granules
In this section, we examine the following properties (we call them as axioms) of granules (by Prof. Mihir Chakraborty): IX ∀G ∈ G : l r (u r (G)) = u r (G) X l r (G) and u r (G) are duals Proof (Axiom I). This axiom trivially holds because in the similarity based rough sets approximation space every granule contains at least 2 objects.
Proof (Axiom II). The axiom holds as every granule has at least one representative. We can associate the granule with one of the representatives of the granule.
Proof (Axiom III). If representative b is in the granule of representative a, then it could only happen if G a = G b . Let us suppose that G a = G b . From Axiom II we know that b ∈ G b . So if representative b is in G a , then G a ∩ G b = {b} which means that G a and G b are not disjoint. This is a contradiction, therefore G a and G b must be the same set.
Proof (Axiom IV). l r (G) = {G | G ∈ G and ∀x ∈ REP (G ) : x ∈ G}. The granules are pairwise disjoint, so there is no granule whose representatives is a member of G (other than G itself). Naturally, every representative of G is the member of G. Therefore, the set {G | G ∈ G and ∀x ∈ REP (G ) : x ∈ G} contains only G from which l r (G) = G follows.
Proof (Axiom V). The proof of the fifth axiom is very similar to the proof of the fourth axiom. u r (G) = {G | G ∈ G and ∃x ∈ REP (G ) : x ∈ G}. The granules are pairwise disjoint, so there is no granule whose representatives is a member of G (other than G itself). If ∀x ∈ REP (G) : x ∈ G is true, then ∃x ∈ REP (G) : x ∈ G will be also true. Therefore, the set {G | G ∈ G and ∀x ∈ REP (G ) : x ∈ G} contains only G from which u r (G) = G follows.
Proof (Axiom X). The duality property holds if the following two equalities hold for any granule G ( denotes the complement operator): In this example, l r (G 1 ) = {a, b} and G 1 = {c, d, e}. From this u r (G 1 ) = {c, d} follows. However, u r (G 1 ) = {a, b, e} = {a, b}. Therefore the duality property does not hold.

Properties of Approximation Pairs
In the previous section, the axioms only focused on the granules. In this section, we examine some additional properties of the proposed approximation pair. Here, the properties to be checked are based on definable and arbitrary sets not only granules. The most essential features of approximation pairs are specified as follows. Proof (Monotonicity). Let S and S be two arbitrary set such that S ⊂ S which means that there is an object x which is a member of S but not a member of S. The following cases can be true for x:
x is a non-representative, then l r (S) = l r (S ) and u r (S) = u r (S ) 3. x is a representative of a granule G, then the following cases can happen: (a) if ¬∃y(y ∈ REP (G) ∧ x = y ∧ y ∈ S), then l r (S) = l r (S ) and u r (S) ⊂ u r (S ) (b) if ∃y(y ∈ REP (G) ∧x = y ∧y ∈ S), then l r (S) = l r (S ) and u r (S) = u r (S ) (c) if ∀y(y ∈ REP (G) ∧ x = y → y / ∈ S), then l r (S) ⊂ l r (S ) and u r (S) ⊂ u r (S ) In every case, we found that l r (S) ⊆ l r (S ) and u r (S) ⊆ u r (S ), therefore the monotonicity holds.
Proof (Weak approximation property). Let S be an arbitrary set and let us assume that there is a granule G such that G ⊆ l r (S) but G u r (S). Due to the definition of the lower approximation, we know that ∀x ∈ REP (G) : x ∈ S is true, so ∃x ∈ REP (G) : x ∈ S is also true. This implies that G ⊆ u r (S). We reached a contradiction, therefore the weak approximation property holds. Proof (Normality of l r and u r ). The empty set does not have a representative. Therefore the condition in the definition of the lower and upper approximation is false for every granule. This implies that l r (∅) = u r (∅) = ∅. Theorem 5. Let G ∈ G and D ∈ D. If a ∈ G and a ∈ D then G ⊆ D.
Proof. If a ∈ D then there exists a G ∈ G such that a ∈ G and G ⊆ D. The members of G are pairwise disjoint, so it is true for all G 1 , G 2 ∈ G that G 1 ∩ G 2 = ∅ only if G 1 = G 2 . Therefore G = G hence a ∈ G and a ∈ G . Earlier we have found that G ⊆ D and so G ⊆ D.
Proof. We indirectly suppose, that there exists a D ∈ D so that l r (D) ⊆ D. Therefore there exists an a ∈ l r (D) so that a / ∈ D. If a ∈ l r (D) then there exists a G ∈ G where REP (G) ⊆ D such that a ∈ G. REP (G) = ∅ so there exists a b ∈ REP (G) and so b ∈ D. Because REP (G) ⊆ G it is also true that b ∈ G. Based on Theorem 5, if b ∈ G and b ∈ D then G ⊆ D. Because of a ∈ G the a ∈ D contradiction appears. Proof. We indirectly suppose, that there exists a D ∈ D so that u r (D) ⊆ D. Therefore there exists an a ∈ u r (D) so that a / ∈ D. If a ∈ u r (D) then there exists a G ∈ G where REP (G) ∩ D = ∅ such that a ∈ G. So there exists a b ∈ REP (G) ∩ D so obviously b ∈ REP (G) and b ∈ D. Because REP (G) ⊆ G it is also true that b ∈ G. Based on Theorem 5, if b ∈ G and b ∈ D then G ⊆ D. Because of a ∈ G the a ∈ D contradiction appears. Proof. Previously we proved that l r and u r are monotone and the normality of u r and the weak approximation property hold. We need to prove that the granularity of D also holds. From Theorem 6 we know that l r (D) ⊆ D for any definable set. We just need to prove that D ⊆ l r (D) for any definable set. Let's indirectly suppose that D l r (D). It means that there is a granule G such that G ⊆ D but G l r (D). Therefore, there must be a representative member r of G such that r / ∈ D. By definition r ∈ G . If G ⊆ D, then every member of G is a member of D. However r ∈ G but r / ∈ D, therefore G cannot be a subset of D. This contradicts our original assumption. So D ⊆ l r (D).

Conclusion
In [11,12] the authors introduced a partial approximation space relying on the tolerance relation (representing similarity). The genuine novelty of this new approximation space is the way in which the system of base sets is defined: it is the result of correlation clustering, and so the similarity is taken into consideration generally. In granular computing, a granule is a collection of objects that are treated in the same way. In correlation clustering, a cluster contains entities that are typically similar to each other. In this case, the objects that are in the same cluster are treated in the same way. Therefore, we can treat the clusters and so the base sets as granules. In data sciences, it is very common to use only a subset of the original dataset instead of the entire collection. The members of this subset can be called as representatives. A very important criterion is that these objects must have the same properties as the whole data set. In [5,10] we provided a possible way to choose the necessary number of representatives of a set. We also introduced a new approximation pair which is based on the representatives. In this paper, we examined some essential properties of granules (proposed by Prof. Mihir Chakraborty). We showed that the system of granules generated by the correlation clustering satisfies all the minimal properties of the granules. Therefore, the clusters can be really treated as granules. We also proved that the introduced approximation pair is a weak approximation pair.