Keywords

1 Introduction

There exist various approaches to modeling dependencies between input and output domains of interest that are applicable, e.g., in the process of gaining knowledge in databases or for confirmation of assertions about patterns in an analyzed database. These assertions can often be expressed using a logical calculus, and items in a database serve as basic observations that allow us to support or reject them. Certain patterns of interest with fuzzy attributes can be analyzed involving a four-fold table, which gathers information from the database about the number of objects that satisfy both the antecedent “A” and the consequent “B”, only “A”, only “B” or neither, where “A” and “B” can be of a vague nature. This is a key component of both the fuzzy association rules [1, 12, 13] and the fuzzy GUHA method [5, 7, 15, 17]. Note that fuzzy association rule mining is part of the GUHA method, so we will only report on this broader method below.

Both of the above methods test automatically generated hypotheses, and these hypotheses can take the form of a single fuzzy rule [8, 16]. Testing is carried out based on a suitably chosen quantifier [10, 11]. In practical applications that generate fuzzy rules using the GUHA quantifier [18], mainly bivalent quantifiers have been used. However, GUHA quantifiers are defined using statistics and can be identified with functions having values in [0, 1].

In this paper, we use GUHA quantifiers that are suitable to analyze the dependence of the form

$$\begin{aligned} \text {``If antecedent then consequent''.} \end{aligned}$$

These quantifiers are referred to as implicational [6, 19]. Next, we show their suitability in fuzzy modeling. We combine the values of this implicational quantifier with the appropriate fuzzy rules to obtain a new class of weighted fuzzy rules. This expansion provides a promising avenue for diverse applications in various fields; for example, the integration of weighted fuzzy rules can contribute to more precise and robust data mining processes, enabling the discovery of intricate relationships within complex datasets; due to assigning different weights to individual fuzzy rules, the classification system can establish finer decision boundaries, which enables more precise classification of data points that fall within ambiguous or overlapping regions of the feature space.

2 A Four-Fold Table and Implicational Quantifiers

In the sequel, we will use the following symbols:

$$ \begin{aligned} \begin{array}{ll} \mathbin { \& }&{}\quad \text {left continuous t-norm} \\ \mathrel {\rightarrow }&{} \quad \text {residuum of }\mathbin { \& }\\ \lnot &{} \quad \text {involutive negation} \\ \wedge &{}\quad \text {minimum}\\ \vee &{}\quad \text {maximum} \end{array} \end{aligned}$$
(1)

For simplicity of exposition, consider the following data matrix

$$\mathcal D=\{ (x_i,f(x_i)\}_{i\in I},$$

where \(x_i\in X\), \(f(x_i)\in Y\), \(I=\{1,2,\ldots n\}\), \(X,Y\not =\emptyset \) and \(f:X\rightarrow Y\). This \(\mathcal D\) can be visualized as follows:

$$\begin{aligned} \mathcal D=\begin{bmatrix} x_1 &{} \quad y_1=f(x_1)\\ x_2 &{} \quad y_2=f(x_2)\\ \vdots &{} \quad \vdots \\ x_n &{} \quad y_n=f(x_n) \end{bmatrix}. \end{aligned}$$
(2)

Definition 1 (4ft-table)

Let AB be fuzzy sets on \(X,Y\not =\emptyset \), respectively, and \(\mathcal D\) be a data matrix. We define a four-fold table for AB w.r.t. \(\mathcal D\) as a matrix \(2\times 2\)

$$\begin{aligned} 4ft(A,B)= \left[ \begin{array}{ll} a&{} \quad b\\ c &{} \quad d \end{array}\right] , \end{aligned}$$
(3)

where

$$ \begin{aligned} a&=\sum _{i\in I}(A(x_i)\mathbin { \& }B(y_i)),\end{aligned}$$
(4)
$$ \begin{aligned} b&=\sum _{i\in I}(A(x_i)\mathbin { \& }\lnot B(y_i)),\end{aligned}$$
(5)
$$ \begin{aligned} c&=\sum _{i\in I}(\lnot A(x_i)\mathbin { \& }B(y_i)), \end{aligned}$$
(6)
$$ \begin{aligned} d&=\sum _{i\in I}(\lnot A(x_i)\mathbin { \& }\lnot B(y_i)) . \end{aligned}$$
(7)

The values of the matrix 4ft(AB) are connected to the fuzzy cardinalities of the data matrix within the corresponding fuzzy Cartesian product. For example, the value a is computed as the fuzzy cardinality of \(\mathcal {D}\) over the fuzzy Cartesian product of A and B.

The following definition (taken from [11]) of implicational quantifiers was designed to provide a versatile tool for expressing and quantifying various degrees of dependency and causality between (fuzzy) sets based on observations from the data matrix.

Definition 2 (Implicational quantifier)

[Implicational quantifier] Let q be a function valued in the interval [0, 1] defined for all pairs (ab) of real numbers such that \(a+b>0\).

We say that q is an implicational quantifier if it satisfies the following property:

$$\begin{aligned} \text {if }a\le a'\text { and }b'\le b\text { then }q(a,b)\le q(a',b'), \end{aligned}$$
(8)

is valid for all \(a,b,a',b'\in \mathbb {R}\).

For a particular 4ft(AB) of the form (3), we often write q(AB) instead of q(ab).

It has been established [11] that there is a direct relationship between implicational quantifiers and fuzzy implications, so that for every fuzzy implication, there is a corresponding way to construct an implicational quantifier.

Example 1

The following are examples of implicational quantifiers:

$$\begin{aligned} q_1(a,b)&=a/(a+b),\end{aligned}$$
(9)
$$\begin{aligned} q_2(a,b)&=(0.9^{a+1})\mathrel {\rightarrow }_L(0.6^{b+1}),\end{aligned}$$
(10)
$$\begin{aligned} q_3(a,b)&=(0.8^{a+1})\mathrel {\rightarrow }_P(0.8^{b+1}),\end{aligned}$$
(11)
$$\begin{aligned} q_4(a,b)&=(b/(a+b))\mathrel {\rightarrow }_L(a/(a+b)),\end{aligned}$$
(12)
$$\begin{aligned} q_5(a,b)&=(b/(a+b))\mathrel {\rightarrow }_P(a/(a+b)), \end{aligned}$$
(13)

for all ab being positive reals, where \(\mathrel {\rightarrow }_L\) is Łukasiewicz residuum and \(\mathrel {\rightarrow }_P\) is the product residuum defined as

$$\begin{aligned} x\mathrel {\rightarrow }_Ly&=\min (1,1-x+y),\end{aligned}$$
(14)
$$\begin{aligned} x\mathrel {\rightarrow }_Py&=\min (1,y/x), \end{aligned}$$
(15)

for all \(x,y\in [0,1]\).

Fig. 1.
figure 1

Input data.

Fig. 2.
figure 2

Fuzzy sets A (Figs. 2(a) and 2(b)) related to Example 2, Fuzzy sets C (blue line) and B (green line). (Color figure online)

Example 2

  • Consider fuzzy sets A from Fig. 2(a), BC from Fig. 2(c), and input data \(\mathcal {D}\) from Fig. 1. Suppose the data from Fig. 1 illustrates commodity sales over time. In this context, the fuzzy set A represents a time segment, while the fuzzy sets B and C represent commodity sales, all characterized by imprecise boundaries. The values \(\{a,b\}\) of the four-fold table for AB w.r.t. \(\mathcal D\) are \(\{a,b\}=\{ 2.76, 10.64\}\), and for AC w.r.t. \(\mathcal D\), we obtain \(\{a,b\}=\{0 , 13.4 \}\). The values of quantifiers \(q_1,q_2.\ldots ,q_5\) defined by (9)–(13), respectively, are the following:

    $$ \begin{array}{c||c|c|c|c|c} i&{}1&{}2&{}3&{}4&{}5 \\ \hline \hline q_i(A, B)&{}0.21&{} 0.33&{}0.17&{} 0.41&{} 0.26\\ \hline q_i(A, C)&{}0.0&{} 0.1&{} 0.05&{} 0.0&{} 0.0\\ \end{array} $$
  • Consider fuzzy sets A from Fig. 2(b), BC from Fig. 2(c), and input data \(\mathcal {D}\) from Fig. 1. The values \(\{a,b\}\) of the four-fold table for AB w.r.t. \(\mathcal D\), we obtain \(\{a,b\}=\{6.61 , 6.79\}\), and for AC w.r.t. \(\mathcal D\), we obtain \(\{a,b\}=\{2.95, 10.45 \}\). The values of quantifiers \(q_1,q_2.\ldots ,q_5\) defined by (9)–(13), respectively, are the following:

    $$ \begin{array}{c|c|c|c|c|c} i&{}1&{}2&{}3&{}4&{}5 \\ \hline \hline q_i(A, B)&{}0.49&{} 0.57&{} 0.96&{} 0.99&{} 0.97\\ \hline q_i(A, C)&{}0.22&{} 0.34&{} 0.19&{} 0.44&{} 0.28\\ \end{array} $$

Let us recall from [11] that we have two ways of generating implicational quantifier using fuzzy implication, that is,

  • Let \(p, r\in (0,1)\) be weights. Then

    $$\begin{aligned} q_{p,r}(a, b) = (p^{a+1})\mathrel {\rightarrow }(r^{b+1}), \end{aligned}$$
    (16)

    is the implicational quantifier. For quantifiers obtained by this construction, we have the following property: If \(\frac{a+1}{b+1}\ge \frac{\log r}{\log p}\) then \(q_{p,r} (a, b) = 1\). For equal weights \(p=r\) the threshold \(\frac{\log r}{\log p}=1\), so, in this case, we obtain \(q_{p,r}(a, b) = 1\) whenever \(a=b\).

  • The following is an implicational quantifier:

    $$\begin{aligned} q_{}(a, b) = \Bigl (\frac{b}{a+b}\Bigr )\mathrel {\rightarrow }\Bigl (\frac{a}{a+b}\Bigr ). \end{aligned}$$
    (17)

    These quantifiers are not as interesting for the residual implication \(\mathrel {\rightarrow }\) because \(q(a, b) = 1\) whenever \(a\ge b\). It is more suitable for non-residual implications, such as the Kleene-Dienes implication for which \(q(a, b) = 1\) iff \(b=0\) (for more details, see [11]).

By observing the above special constructions of the implicational quantifier, we found that there is a large class of implicational quantifiers that are based on some order-reversing mapping.

Proposition 1

Let \(\mathcal D\) be a data matrix and \(g:\mathbb {R}\mapsto [0,1]\) be a decreasing function. Then

$$\begin{aligned} q_{g}(a, b) = g(a)\mathrel {\rightarrow }g(b), \end{aligned}$$
(18)

is the implicational quantifier.

Proof

It follows from the monotony of \(\mathrel {\rightarrow }\) in the second argument and the antitony in the second. If \(a\le a'\) and \(b'\le b\) then \(g(a')\le g(a)\) and \(g(b)\le g(b')\), and consequently

$$\begin{aligned} g(a)\mathrel {\rightarrow }g(b)&\le g(a')\mathrel {\rightarrow }g(b),\\ g(a')\mathrel {\rightarrow }g(b)&\le g(a')\mathrel {\rightarrow }g(b'). \end{aligned}$$

Hence,

$$\begin{aligned} g(a)\mathrel {\rightarrow }g(b)\le g(a')\mathrel {\rightarrow }g(b'), \end{aligned}$$

which shows that \(q_{g}(a,b)\le q_{g}(a',b')\), which means that \(q_{g}\) is an implicational quantifier.

Example 3

Let \(n=|\mathcal D|\), where \(\mathcal D\) is a data matrix. For example, we can use to construct (18) the following strictly monotone order-reversing functions:

$$\begin{aligned} g_1(x) &= 1 - (x/n)^2,\end{aligned}$$
(19)
$$\begin{aligned} g_2(x) &= (n - x)/n,\end{aligned}$$
(20)
$$\begin{aligned} g_3(x) &= \exp (-x),\end{aligned}$$
(21)
$$\begin{aligned} g_4(x) &= \sqrt{(}1 - (n - x)^2/n^2),\end{aligned}$$
(22)
$$\begin{aligned} g_5(x) &= -\ln (n-x + 1) / \ln (n + 1). \end{aligned}$$
(23)

3 Fuzzy Rules with Weights Given by an Implicational Quantifier

Weighted fuzzy rules are often used in fuzzy logic systems to improve the accuracy and reliability of the system output [2, 9, 14]. By adjusting the weighting factors of the fuzzy rules, it is possible to fine-tune the behavior of the system and to adjust its sensitivity to different input conditions. This can be done at several levels, the antecedent level, the subsequent level or the whole rule [4]. The last level will be considered later.

Provided we know the dependency to be modeled, the fuzzy rules can be set without any additional computational effort, as, for example, in the case of monotonic dependency depicted in Fig. 3(a).

Fig. 3.
figure 3

An implicational model in Fig. 3(a) utilizing fuzzy sets depicted in Figs. 3(b) and 3(c) for monotonic dependency of the form \(y=x^2\) together with the noisy data \(\{x_j,x_j^2+\text {RandBetween}(-x_j,x_j)\}^{65}_{j=1}\) (scatter plot).

In reality, this situation appears rare. Therefore, a number of methods have been developed during the last decades to create a fuzzy rule base (including a weighted one) based on the input data. One of such models is shown in Fig. 4, where we construct neighborhoods S(xp) and \(S'(y,q)\) using some preset similarity relations \(S,S'\) for each data entry (pq) for all \(x\in X,y\in Y\), we join them with the implicative rule \(S(x,p)\mathrel {\rightarrow }S'(y,q)\), and finally the minimum is taken over all \((p,q)\in \mathcal {D}\). For \(\mathcal {D}\) as in Fig. 1, we obtain the implicative model as in Fig. 4. We can observe that the more data in the data matrix, the smaller the degrees of the final implicative model. Moreover, we lose simplicity of the resulting rule base and interpretability.

In some cases it is advantageous to use a fixed number of fuzzy rules in a rule base or to use fuzzy sets with preset linguistic interpretation. Therefore, in the following, we propose a new model that allows one to combine arbitrarily fuzzy sets from the input and output domains, and additionally, there are weights attached that tell us how much the rules suit the input data.

Fig. 4.
figure 4

Example of implicational model based on similarity and input data in Fig. 1.

This new model opens up a new approach to weighted fuzzy rules. Note that basically we have two main interpretations of fuzzy IF–THEN rules. One uses \( \mathbin { \& }\) to join the inner parts of a particular rule and then \(\bigvee \) to glow the outer parts. Here, we focus only on the model that uses \(\mathrel {\rightarrow }\) within the rules and \(\bigwedge \) to join the rules together, and therefore we call it the implicational model. A generalization of this model to the weighted implicational model was provided, e.g., in [3]. In the following, we introduce a weighted implicational data model based on implicational quantifier values.

Definition 3

Let \(\mathcal D\) be a data matrix of the form (2), \(A_i\) and \(B_i\) be fuzzy sets in X and Y, respectively, for all \(i\in I\), where I is a finite set of indexes. Moreover, let q be an implicational quantifier. Then

$$\begin{aligned} \textrm{GRules}^{\mathcal D}_q(x,y)= \bigwedge _{i\in I} \bigl (q(A_i,B_i)\mathrel {\rightarrow }[A_i(x)\mathrel {\rightarrow }B_i(y)]\bigr ), \end{aligned}$$
(24)

for all \(x\in X, y\in Y\).

We call \(\textrm{GRules}_q\) the weighted implicative model w.r.t. q and \(\mathcal D\).

Since the implicational quantifier is a measure of dependence between two predicates based on observations, it works as a “switch” of the rule in the graded implicative data model. Observe the following (Fig. 5): if \(q(A,B)=1\) then the weighted fuzzy rule \(q(A,B)\mathrel {\rightarrow }(A(x)\mathrel {\rightarrow }B(y))\) becomes the standard fuzzy rule \(A(x)\mathrel {\rightarrow }B(y)\), while if \(q(A,B)=0\) then the weighted fuzzy rule is evaluated at 1 everywhere, which corresponds to the fact that no implicational dependency was observed between A and B in the given data. In general, we can state that more data supporting the dependency we have higher the weight of the fuzzy rule, and consequently, closer we are to the nonweighted fuzzy rule as stated in the following proposition.

Fig. 5.
figure 5

Example of weighted fuzzy rules. (Color figure online)

Proposition 2

Let \(\mathcal {D, D'}\) be data matrices of the form (2), \(A_i\) and \(B_i\) be fuzzy sets on X and Y, respectively, for all \(i\in I\), where I is a finite set of indexes. Furthermore, let q be an implicational quantifier and \(a_i \;(a'_i),b_i \;(b'_i)\) be values of a four-fold table for \(A_i,B_i\) w.r.t. \(\mathcal D \;(\mathcal D')\) given by (3) for all \(i\in I\).

If \(a_i\le a'_i\text { and }b'_i\le b_i\) for all \(i\in I\) then

$$\begin{aligned} \textrm{GRules}^{\mathcal D'}_q(x,y)\le \textrm{GRules}^{\mathcal D}_q(x,y), \end{aligned}$$
(25)

is valid for all \(x\in X,y\in Y\), where \(\textrm{GRules}^{\mathcal D(\mathcal D')}\) is the weighted implicative model w.r.t. q and \(\mathcal {D} \;(\mathcal {D'})\) given by (24).

Proof

Due to the antitony of \(\mathrel {\rightarrow }\) in the first argument.

4 Conclusions

We showed a new construction of a subclass of implicational quantifiers using residual operators (see Proposition 1). This method is within the framework of standard fuzzy logic (the truth values are from [0, 1]) and is based on a construction introduced in [11]. Additionally, we proposed a well-suited fuzzy relational model (see Definition 3) that utilizes implicational quantifiers as weights. We have provided a justification for this model (see Proposition 2) to establish a new well-founded class of weighted fuzzy rules that precisely align with intuitive expectations for their behavior.