1. Introduction
Formal concept analysis (FCA), proposed by Wille [
1], has been widely applied in knowledge discovery [
2,
3,
4,
5,
6]. In FCA, formal contexts, formal concepts, and concept lattices are the three cornerstones [
7]. To deal with various data, formal contexts are extended to fuzzy contexts [
8,
9,
10,
11,
12,
13,
14,
15,
16], decision contexts, incomplete contexts [
17,
18,
19,
20], multi-scale contexts [
21,
22,
23,
24], and triadic contexts [
25]. Most of the studies on FCA concentrate on the following topics: concept lattices’ construction [
26,
27,
28], knowledge reduction [
29,
30], rule acquisition [
19,
31,
32,
33,
34,
35,
36], three-way FCA [
37,
38,
39,
40,
41,
42,
43,
44], and concept learning [
45,
46].
In classic FCA, attention is only paid to positive attributes, while negative attributes are neglected. In fact, positive attributes and negative attributes are of equal importance in many fields. Qi et al. [
37] proposed negative operators. To be specific, using negative operators, the attributes that are not owned by any given set of objects and the objects that do not have any given set of attributes can be obtained. Based on negative operators, negative concepts and negative concept lattices are defined.
In classic contexts, an attribute is either owned or not owned by an object, that is the relation between an object and an attribute is a binary relation. However, in real data, attributes could be many-valued, and these many-valued attributes are called general attributes. A data table with general attributes needs to be transformed into a one-valued context by the scaling approach [
7]. The scaling approach is to replace each general attribute with a sequence of one-valued attributes considered as the corresponding values of the general attribute at certain granularity sizes. For a general attribute, finding appropriate granularity sizes is expected according to a specific requirement. Since the requirements are different, changing the granularity sizes of general attributes is common.
If a classic or negative concept lattice is reconstructed every time whenever the granularity sizes of the attributes change, it is obvious that it will be very computationally expensive and time consuming. In order to avoid reconstructing classic or negative concept lattices, studying the issues of updating classical or negative concept lattices is important when the granularity sizes of attributes change. Many researchers [
8,
47,
48,
49] have investigated how to update classic concept lattices when the granularity sizes of attributes change. However, little work has been performed on how to update negative concept lattices when the granularity sizes of attributes change. This paper focused on how to update negative concept lattices with increasing the granularity sizes of the attributes.
The rest of this paper is structured as follows.
Section 2 recalls the basic knowledge about formal concept analysis.
Section 3 studies the relationship between negative concept lattices (negative concepts and covering relations) before and after increasing the granularity sizes of attributes.
Section 4 develops a new algorithm (named NCL-Fold) to update the negative concept lattices after the increase.
Section 5 carries out the comparison experiment for verifying the effectiveness of our algorithm.
Section 6 concludes this paper.
2. Preliminaries
In this section, we present the related notions and propositions in FCA. A detailed description of them can be found in [
1,
37,
47]. We write
to denote the power set of a set.
A formal context is a triple , where G refers to a set of objects, M refers to a set of attributes, and I refers to a binary relation between G and M. Here, (or ) denotes that the object x has the attribute m, while (or ) denotes that the object x does not have the attribute m, where .
Let
be a formal context. For
and
, the positive derivative operator ∗ and the negative derivative operator
are as follows:
For these operators, there exist some useful properties. Take the negative derivative operator for example. For and , then:
- (1)
and ;
- (2)
and ;
- (3)
and ;
- (4)
;
- (5)
and ;
- (6)
and .
Using these derivative operators, formal concepts and negative concepts are formed. For and :
(1) A formal concept is a pair , iff and ;
(2) A negative concept (N-concept) is a pair , iff and .
The partial-order relationship among formal concepts and N-concepts is defined as follows, respectively. For formal concepts
and
, N-concepts
and
of the formal context
:
All formal concepts and N-concepts generated from the formal context compose the formal concept lattice and the N-concept lattice under the above partial-order relationships, respectively. The formal concept lattice and N-concept lattice of the formal context are denoted by and , respectively.
On the basis of the partial-order ⩽, the definition of the covering relation ≺ is proposed. For formal concepts
and
, N-concepts
and
of the formal context
:
On the basis of the partial-order ≺, the definitions of lower neighbors (or children) and upper neighbors (or parents) are proposed. For formal concepts and , N-concepts and of the formal context :
(1) If , then is called a lower neighbor (or a child) of or is called an upper neighbor (or a parent) of ;
(2) If , then is called a lower neighbor (or a child) of or is called an upper neighbor (or a parent) of .
In addition, the notions of a granularity tree, cuts, and increasing the granularity sizes are given. A granularity tree (g-tree) of attribute m is a rooted tree, in which each node of the tree is labeled as a unique attribute name, and if, for any node v, the children of node v are nodes , then must be a partition of . For a set of nodes in the g-tree of attribute m, if, for each leaf node , there is only one node on the path from the root m to , the set of nodes is a cut at certain granularity sizes in the g-tree. For two cuts in a given g-tree and , if, for any , there exists such that , is called a refinement of , denoted by . Increasing the granularity sizes of an attribute m replaces the existing finer cut () of the attribute m with another coarser cut () of the attribute m, where and are two different cuts in the g-tree of attribute m, and .
Example 1. Table 1 depicts a context , where a, b, and c are three one-valued attributes and y is a many-valued attribute. The g-tree for attribute y is displayed in Figure 1. In the g-tree, there are five cuts: , , , , and . In Table 1, the cut is used. In Table 1, for attribute y, by replacing the finer cut with the coarser cut , which increases the granularity sizes, the context is transformed into the context (i.e., Table 2). For a formal context , before and after increasing the granularity sizes of the attributes, the negative derivative operators, the N-concept lattices, the subconcept–supconcept relations, and the covering relations are denoted by , , , , and , , , , respectively, hereafter.
For the finer cut and the coarser cut of attribute m, there exists the attribute-value-transformation function such that . On the basis of the function , the following mappings are defined:
such that ;
such that ;
such that ;
such that ;
such that .
3. Relationship between N-Concept Lattices before and after Increasing the Granularity Sizes of Attributes
In this section, we discuss the relationship between N-concept lattices before and after increasing the granularity sizes of the attributes. The following theorems are useful to discuss the issue.
Theorem 1. Let and be the N-concept lattices of a given formal context before and after increasing the granularity sizes of an attribute m, respectively, and and be the cuts of the attribute m before and after the increase. If , then, for each , is an extent in .
Proof. It is obvious that increasing the granularity sizes of an attribute m is equal to adding attributes in and removing attributes in . In addition, for , we have . Thus, for each , must be an extent in if X is an extent in . □
Theorem 2. Let and be the N-concept lattices of a given formal context before and after increasing the granularity sizes of an attribute m, respectively. If is an N-concept in , then X is an extent in .
Proof. We discuss two situations for any :
(i) Assume . Obviously, holds. Thus, we can obtain that X is an extent in .
(ii) Assume . Since holds for , we can obtain , where . Hence, . Consequently, X is an extent in .
Finally, we can conclude that X is an extent in for any .
□
Based on Theorem 2, we can easily conclude the following theorem.
Theorem 3. Let and be the N-concept lattices of a given formal context before and after increasing the granularity size of an attribute m, respectively. There does not exist new N-concepts in .
3.1. Relationship between N-Concepts before and after Increasing the Granularity Sizes of Attributes
We can describe N-concepts in N-concept lattices before and after increasing the granularity sizes of attributes in terms of the following definition.
Definition 1. Let and be the N-concept lattices of a given formal context before and after increasing the granularity sizes of an attribute m, respectively, and and be the cuts of the attribute m before and after the increase, respectively. Then:
- (1)
If and , is an old N-concept, denoted by ;
- (2)
If and X is not an extent of any N-concept in , is a deleted N-concept, denoted by ;
- (3)
if with and , is a tight N-concept, denoted by .
Next, we give the necessary and sufficient conditions of each category.
Theorem 4. For an N-concept , we have:
- (1)
is an old N-concept if and only ;
- (2)
is a deleted N-concept if and only if the following statements are true: (i) ; (ii) there exists at least one N-concept among the parents of in such that satisfies the two conditions: and ;
- (3)
is a tight N-concept if and only if the following statements are true: (i) ; (ii) there does not exist such an N-concept among the parents of in such that satisfies the two conditions: and .
Proof. - (1)
(⇒) If is an old N-concept, it is obvious that is an N-concept in and an N-concept in . Next, we prove by using reduction to absurdity. Assume that . According to the process of the proof in Theorem 2, we can obtain , where . Hence, , which contradicts . Hence, .
(⇒) If with is an N-concept in , and hold. Hence, is an N-concept in and an N-concept in . That is to say, is an old N-concept.
- (2)
(⇒) Firstly, by using reduction to absurdity, we prove that . Assume that . Because the objects do not change before and after the increase, we can obtain . Furthermore, it follows that X is an extent in , which is not consistent with . Hence, .
Secondly, we prove the rest.
Because of , we have and . Since holds for , we can obtain: ; holds when ; holds when . Noting that is a deleted N-concept, it follows that and . Hence, . Therefore, there exists an N-concept such that , and .
Then, we prove that E satisfies the following conditions. Because of and , we have and . That is to say, and .
Finally, there must exist an N-concept such that , and .
(⇐) Assume that and there exists one N-concept with such that and . Obviously, holds. By the analysis in (⇒), it follows that . Since is a parent of and holds, we can conclude that . Thus, X is not an extent in . That is to say, is a deleted N-concept:
- (3)
It is easy to reach this conclusion according to (1) and (2) in Theorem 4.
□
Based on Theorem 4, we show the following definition and remark.
Definition 2. Let be the N-concept lattices of a given formal context before increasing the granularity sizes of an attribute m and be the cuts of the attribute m before the increase. For two N-concepts with and with and :
- (1)
is described as a destroyer of , and is described as a victim of ;
- (2)
The N-concept with and is described as a terminator of .
Remark 1. For two N-concepts and in , if is a deleted N-concept and is a destroyer of , we have:
- (1)
The number of destroyers of is either equivalent to one or more than one, and the set of all the destroyers is denoted by ;
- (2)
The number of casualties of is either equivalent to one or more than one, and the set of all the victims of is denoted by .
- (3)
The number of terminators of is equivalent to one, and the only terminator of is denoted by ;
- (4)
The terminator of is the maximum one among all the destroyers of .
Combining Definition 2 with Theorem 4 and Remark 1, we have the following theorem.
Theorem 5. For a deleted N-concept , we have:
- (1)
If is the terminator of , then must not be a deleted N-concept;
- (2)
If is a destroyer of and is not the terminator of , then must be a deleted N-concept.
- (3)
If is a destroyer of and is not a deleted N-concept, then must be the terminator of .
Proof. - (1)
Since is the terminator of , we can obtain . Obviously, must be an N-concept in . That is to say, is not a deleted N-concept.
- (2)
Let be the terminator of . Obviously, . Since is the maximum one among all the destroyers of and with is a destroyer of , we have and . Hence, must be a deleted N-concept and is the terminator of .
- (3)
It is easy to reach this conclusion according to (2) in Theorem 5.
□
3.2. Relationship between the Covering Relations before and after Increasing the Granularity Sizes of Attributes
We can describe the covering relations in N-concept lattices before and after increasing the granularity sizes of the attributes in terms of the following definition.
Definition 3. Let and be the N-concept lattices of a given formal context before and after increasing the granularity sizes of an attribute m, respectively. Then:
- (1)
If and hold, (or ) is an old covering relation;
- (2)
If and hold, is a new covering relation;
- (3)
If holds and at least one of and is a deleted N-concept, is a deleted covering relation.
For
and
with
, two mappings are given by
Obviously, is not a bijection, but is a bijection.
Let
with
. If
is the terminator of a certain N-concept, then we give the following remarks:
The covering relations among transformed concepts are listed in the following two theorems.
Theorem 6. For , if is not the terminator of any N-concept, then .
Proof. At first, by using reduction to absurdity, we prove that is not a deleted N-concept if is not the terminator of any N-concept and is a child of in . Assume that is a deleted N-concept, which implies . Obviously, there must exist an N-concept in such that , and is the terminator of . According to the definition of terminators, we can obtain that and . Because with is not the terminator of any N-concept and is a child of in , which implies , , we have . Hence, , which means . That is to say, cannot be a child of in , which is inconsistent with the fact that is a child of in . Thus, is not a deleted N-concept. Therefore, and hold. In addition, since there do not exist new N-concepts in , is a child of in . In summary, holds. □
Theorem 7. For , if is the terminator of a certain N-concept, then .
Proof. Since there does not exist new N-concepts in , it is obvious that .
Let be an N-concept . It is easily seen that there must exist such that , which implies . Hence, holds.
Let be an N-concept . It is easily seen that there must exist two N-concepts and in such that , and . Hence, according to the definition of terminators, we have , which implies that is an N-concept in or . That is to say, holds. Thus, we can obtain and .
In summary, . Finally, we can easily conclude that . □
Theorem 8. Let and be the N-concept lattices of a given formal context before and after increasing the granularity sizes of an attribute m, respectively. For two non-deleted N-concept and in , the:
- (1)
is an old covering relation, if and only if one of the following statements is true: (i) is not the terminator of any N-concept and is an N-concept in ; (ii) is the terminator of a certain N-concept and is an N-concept in ;
- (2)
is a new covering relation, if and only if is the terminator of a certain N-concept and is an N-concept in .
Example 2. Let us continue with Example 1. Two formal contexts and (i.e., Table 3 and Table 4) are obtained from and by the scaling approach. The concept lattices and of and are displayed in Figure 2 and Figure 3, respectively. In Figure 2 and Figure 3, old N-concepts, deleted N-concepts, and tight N-concepts are the white, red, and blue nodes, respectively. In Figure 2 and Figure 3, old covering relations, deleted covering relations, and new covering relations are the black, red, and green lines, respectively. 4. The NCL-Fold Algorithm
In this section, we propose a new algorithm (called the NCL-Fold algorithm i.e., Algorithm 1) for increasing the granularity sizes of an attribute
m, based on the relationship between N-concept lattices before and after the increase as discussed in
Section 3.
Algorithm 1 procedure . |
- 1:
Find the top N-concept in - 2:
- 3:
return
|
The procedure accepts three arguments: the cuts before and after increasing the granularity sizes of attribute m and and the N-concept lattice of a formal context before the increase. updates the N-concept lattice of a formal context after the increase.
The procedure first finds the top N-concept
in
(Line 1). Then, the procedure invokes the following Algorithm 2 to process every N-concept
in
(Line 2) and return updated
(Line 3).
Algorithm 2 procedure .
|
1: | for each child of |
2: | if has not been processed |
3: | |
4: | end if |
5: | end for |
6: | according to Theorem 4 and Definition 1, classify and modify the intent of |
7: | if is a deleted N-concept |
8: | mark as a destroyer and , for every parent with and of |
9: | end if |
10: | mark as a terminator if is not a deleted N-concept and is a destroyer |
11: | according to Definition 3 and Theorem 8, classify the covering relations relating to , set the new covering relations, and remove the deleted covering relations |
12: | |
13: | Mark as processed |
14: | return |
The procedure accepts four arguments: An N-concept , , , and . traverses all N-concepts in a recursive way.
If a child of is not visited, the algorithm recursively invokes using the child , , , and as arguments (Lines 1–5). Then, the N-concept is classified according to Theorem 4, and the intent of is modified according to Definition 1 (Line 6). In addition, for every parent of , if satisfies the conditions of a destroyer, is marked as a destroyer and is updated by adding and to (Lines 7–9). If satisfies the conditions of a terminator, is marked as a terminator (Line 10). Next, according to Definition 3 and Theorem 8, the covering relations relating to are fixed (Line 11). Of course, should be deleted from (Line 12). Finally, is marked as processed, and the updated is returned (Lines 13–14).
Now, we analyze the time complexity of Algorithms 1 and 2.
Firstly, we analyze the time complexity of Algorithm 2. The time complexity of Steps 6–10 is , where is the maximum number of parents of N-concepts in and is the number of attributes. The time complexity of Steps 11–12 is , where and is the number of attributes. Consequently, the time complexity of Algorithm 2 is , where is the number of N-concepts in .
Secondly, we can easily see that the time complexity of Algorithm 1 is , as well.