You are on page 1of 9

ECE 624

Fuzzy Sets in Human-Centric Systems


Fall 2021
Assignment #4
Solutions

Due Monday, November 1, 2021 at 3:00 PM

Each problem worth 10 points; total 50 points.

1.Determine the probability of the fuzzy event A described as shown below

x -5 -4 -3 -1 0 2 3 5 6
A(x) 1.0 0.6 0.8 1.0 0.5 0.4 0.7 0.9 0.9
p(x) 0.15 0.10 0.05 0.20 0.00 0.4 0.05 0.05 0.00

Solution:

The probability of the fuzzy event is computed as follows:


9
𝑃(𝐴) = ∑ 𝐴(𝑥𝑖 )𝑝(𝑥𝑖 )
𝑖=1
= 1 ∙ 0.15 + 0.6 ∙ 0.1 + 0.8 ∙ 0.05 + 1 ∙ 0.2 + 0.5 ∙ 0 + 0.4 ∙ 0.4 + 0.7 ∙ 0.05 + 0.9 ∙ 0.05
+ 0.9 ∙ 0 = 0.69

2.A Gaussian fuzzy number is described as G(x; m, )= exp(-(x-m)2/  2)


Consider a family of Gaussian fuzzy numbers A1, A2, .., A6 where m1=0.6, m2=1.7, m3=3.5,
m4=4.5, m5=7, m6=9.7,  =1.0. The space is [0, 10]. Do the following:
(i) plot these fuzzy sets
(ii) does the family {Ai} form a partition of the space?
(iii) How does the reconstruction error |x̂ -x| where

6 6

x̂= ∑ mi G(x;mi ,𝜎i )/ ∑ G(x;mi ,𝜎i )


i=1 i=1

regarded as a function x look like? Where do you encounter the largest and the smallest
values of the reconstruction error?

Solution:
(i)

1 of 8
Fig. 2.1
(ii)
No, the family {Ai} does not form a partition of the space, since ∑6𝑖=1 𝐴𝑖 (𝑥) is not equal
to 1 for each x.

(iii)
The reconstructed data are determined through the following expression
6 6

x̂= ∑ mi G(x;mi ,𝜎i )/ ∑ G(x;mi ,𝜎i )


i=1 i=1

We show the relationship between x and x̂ , Fig. 2.2.

Fig. 2.2
The reconstruction error |x̂ -x| viewed as a function of x is shown in Fig. 2.3.

2 of 8
Fig. 2.3
When x is 8.35, we obtain the smallest reconstruction error equal to 0. When x is 1.18, 2.59,
4, 5.76, 7, 9.69, the reconstruction error is close to 0.
When x is 7.88, the reconstruction error is the highest, the value is 0.6832.
∑6𝑖=1 𝑚𝑖 𝐺(𝑥: 𝑚𝑖 , σ)
𝑟𝑒𝑐𝑜𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 𝑒𝑟𝑟𝑜𝑟 = −𝑥
∑6𝑖=1 𝐺(𝑥: 𝑚𝑖 , σ)
𝑚1 +∑6𝑖=2 𝑚𝑖 𝐺(𝑚1 :𝑚𝑖 ,σ)
Assume 𝑥 = 𝑚1, 𝑟𝑒𝑐𝑜𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 𝑒𝑟𝑟𝑜𝑟 = − 𝑚1 ,
1+∑6𝑖=2 𝐺(𝑚1 :𝑚𝑖 ,σ)
Because 𝐺(𝑚1 : 𝑚𝑖 , σ) ≠ 0, 𝑟𝑒𝑐𝑜𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛 𝑒𝑟𝑟𝑜𝑟 ≠ 0
The value of the reconstruction error for the model values are shown below; note that
they are not identically equal to zero as the fuzzy sets do not form a partition.
Model value 0.6 1.7 3.5 4.5 7 9.7
reconstruction
0.253 0.192 0.211 0.266 0.003 0.002
error

3. Consider a collection of photos shown in the figure below

E
G

Use the AHP method to determine their membership degrees to the concept of downtown.

3 of 8
In the process of pairwise comparisons use a scale 1-7. Produce a matrix of pairwise
comparisons and determine the membership function of this concept. Interpret the results,
in particular elaborate on their consistency.

Solution:

(This is just an example; the results could be different).

Example 1:
1 1/ 5 1/ 2 1/ 3 1/ 6 2 1/ 3 1/ 7
5 1 2 2 1 6 7 7
2 1/ 2 1 1/ 2 1/ 4 7 1/ 2 1/ 3
3 1/ 2 2 1 1/ 2 7 1 1/ 4
6 1 4 2 1 3 5 2
1/ 2 1/ 6 1/ 7 1/ 7 1/ 3 1 1/ 4 1/ 3
3 1/ 7 2 1 1/ 5 4 1 1/ 6
7 1/ 7 3 4 1/ 2 3 6 1
0.0736 0.1044
0.7052 1.0000
0.1665 0.2361
0.2214 0.3140
max = 9.3793 , eigenvector is , after normalization is
0.4807 0.6817
0.0648 0.0918
0.1549 0.2197
0.4016 0.5695
max − n
The index  = = 0.1963 is larger than 0.1 so the results are inconsistent.
n −1

Example 2:
1 5/3 4/7 1/2 5/6 1/3 5/2 7
3/5 1 1/3 1/2 1/2 2/5 3/2 3
7/4 3 1 7/6 3/2 6/5 7/2 6
2 2 6/7 1 7/6 6/5 4 6
6/5 2 2/3 6/7 1 7/5 3 5
3 5/2 5/6 5/6 5/7 1 5/2 5
2/5 2/3 2/7 1/4 1/3 2/5 1 3
1/7 1/3 1/6 1/6 1/5 1/5 1/3 1

4 of 8
0.2683 0.5142
0.1957 0.3751
0.5217 1.0000
0.4788 0.9177
max = 8.039 , eigenvector is , after normalization is
0.4073 0.7806
0.4432 0.8496
0.1455 0.2790
0.0693 0.1328
max − n
The index  = = 0.0084 is smaller than 0.1 so the results are consistent.
n −1

4. Discuss a way of building a fuzzy set describing a concept of scalene triangle. Suggest
a type of a suitable membership function reflecting the nature of this concept.
Note: there could be alternative solutions.

Solution:

Assume there is a triangle with the sides a, b and c, where obviously we require that 𝑎 <
𝑏 + 𝑐, 𝑏 < 𝑎 + 𝑐 and 𝑐 < 𝑏 + 𝑎.

There are several ways on how a membership function of scalene triangle


𝐴𝑠𝑐𝑎𝑙𝑒𝑛𝑒 𝑡𝑟𝑖𝑎𝑛𝑔𝑙𝑒 (𝑎, 𝑏, 𝑐) could be defined; here is one possibility.

We calculate the difference between sides as follows.


𝑟𝑎𝑛𝑔𝑒 = max(𝑎, 𝑏, 𝑐) − min (𝑎, 𝑏, 𝑐)
𝑑𝑖𝑓𝑓(𝑎, 𝑏) = |𝑏 − 𝑎|/𝑟𝑎𝑛𝑔𝑒
𝑑𝑖𝑓𝑓(𝑎, 𝑐) = |𝑐 − 𝑎|/𝑟𝑎𝑛𝑔𝑒
𝑑𝑖𝑓𝑓(𝑏, 𝑐) = |𝑐 − 𝑏|/𝑟𝑎𝑛𝑔𝑒
The membership function is defined over the space of the sides
𝐴𝑠𝑐𝑎𝑙𝑒𝑛𝑒 𝑡𝑟𝑖𝑎𝑛𝑔𝑙𝑒 (𝑎, 𝑏, 𝑐) = 𝑑𝑖𝑓𝑓(𝑎, 𝑏) 𝑡 𝑑𝑖𝑓𝑓(𝑎, 𝑐) 𝑡 𝑑𝑖𝑓𝑓(𝑏, 𝑐)
where t is some t-norm. Evidently, if any two sides are the same,
𝐴𝑠𝑐𝑎𝑙𝑒𝑛𝑒 𝑡𝑟𝑖𝑎𝑛𝑔𝑙𝑒 (𝑎, 𝑏, 𝑐) = 0.

5. The measurements x1, x2, ..., xN of distance provided by a collection of sonar sensors are
provided below. Using the principle of justifiable granularity determine the following:
(i) an interval information granule
The range is maxkxk – minkxk. In computing specificity, use a linearly decreasing function
of the length of the interval. The numeric representative is the average of the measurements.
(ii) repeat (i) using the median as a numeric presentative of the measurements
(iii) design a triangular fuzzy set A. Again use both the numeric representative as the mean
and the modal value.
Plot the obtained results (characteristic functions and membership functions) and comment
on the obtained results.

5 of 8
Data:
3.50422942 6.04594626 1.37325828 9.21655481 0.37197693 4.70704279
5.46561011 16.2206684 -4.29350912 9.10608292 5.01843154 -0.57557072
3.96826662 2.78085127 7.49036298 -0.3292361 -6.57087518 11.55469125
2.69454594 2.9242975 3.03921353 4.32189999 4.45734424 -1.31952715
8.37430624 -3.55617986 1.27127481 3.74537728 4.81702365 5.94369555
-1.50289602 -6.92389301 4.04972171 0.13645095 10.65204458 9.41862608
7.59905196 4.53083323 5.63113663 3.45923323 1.66749237 6.84719302
8.60560686 -1.14520716 2.95435173 4.50054771 3.05109346 2.54045922
-8.88366625 12.26790709 0.3215126
Solution:

pay attention: the change of l and r is continuous.


(i)
The average (ave) of data is 3.5597. Assume we have the interval [l, r] as the result of
information granule. We separate the range as [l, ave] and [ave, r] to obtain the optimal
value of l and r.
To determine the upper bound r (r changes from ave to max(Data) with a fixed step), we
need to find the maximal V, which is the cov  sp . The cov and sp are the follows:
1
𝑐𝑜𝑣 = 𝑁 𝑐𝑎𝑟𝑑{𝑥𝑘 |𝑥𝑘 ∈ [𝑎𝑣𝑒, 𝑟]}, where 𝑁 = 𝑐𝑎𝑟𝑑{𝑥𝑘 |𝑥𝑘 ≥ 𝑎𝑣𝑒}.
|𝑟−𝑎𝑣𝑒|
𝑠𝑝 = 1 − , where 𝑟𝑎𝑛𝑔𝑒 = max(𝑥) − 𝑎𝑣𝑒 = 12.6609.
𝑟𝑎𝑛𝑔𝑒

Similarity, for the lower bound one has


1
𝑐𝑜𝑣 = 𝑁 𝑐𝑎𝑟𝑑{𝑥𝑘 |𝑥𝑘 ∈ [𝑙, 𝑎𝑣𝑒]}, where 𝑁 = 𝑐𝑎𝑟𝑑{𝑥𝑘 |𝑥𝑘 ≤ 𝑎𝑣𝑒}.
|𝑎𝑣𝑒−𝑙|
𝑠𝑝 = 1 − , where 𝑟𝑎𝑛𝑔𝑒 = 𝑎𝑣𝑒 − min (𝑥) = 12.4434.
𝑟𝑎𝑛𝑔𝑒

The coverage and specificity are shown as follows:

(a) (b)
Fig. 5.1 Coverage, specificity and V. (a) Lower bound. (b) Upper bound.
As seen in Fig. 5.1, the maximal V is 0.4745 and 0.4545 for x is -1.50 and 9.42 for the
lower and upper bound respectively, so the optimal range is [-1.50, 9.42].

6 of 8
(ii)
We repeat (i), median is 3.7454. The range is 12.4753 and 12.6290 for the upper and lower
bound, respectively.
The coverage and specificity are visualized in Fig. 5.2:

(a) (b)
Fig. 5.2 Coverage, specificity and V. (a) Lower bound. (b) Upper bound.
The maximal V is 0.4720 and 0.4560 with x is -1.50 and 9.45 for the lower and upper bound,
so the optimal range is [-1.50, 9.45].

In Fig 5.1 and 5.2, the coverage has jumps since the data is not uniformly distributed, when
we use ‘card’ function, it keeps unchanged until the bound value is equal to certain data
points, resulting in the coverage changes unsteadily under this condition and further
causing the jumps in V.

(iii)
Again assume that we have a triangular fuzzy set A, whose numeric representative (m) is
mean value (3.5597), then we determine the lower (l) and upper bounds (r) by the principle
of justifiable granularity. The formula of coverage (cov) and specificity (sp) shown as
follows,
For the lower bound:
𝑐𝑜𝑣 = ∑𝑘:𝑙≤𝑥𝑘<𝑚 𝐴(𝑥𝑘 )⁄𝑁, where 𝑁 = 𝑐𝑎𝑟𝑑{𝑥𝑘 |𝑥𝑘 ≤ 𝑎𝑣𝑒}
1 |𝑚−𝑙𝛼 |
𝑠𝑝 = ∫0 1 − 𝑑𝛼, where 𝑟𝑎𝑛𝑔𝑒 = 𝑚 − min(𝑥) = 12.4434.
𝑟𝑎𝑛𝑔𝑒
For the upper bound:
𝑐𝑜𝑣 = ∑𝑘:𝑟≥𝑥𝑘 ≥𝑚 𝐴(𝑥𝑘 )⁄𝑁, where 𝑁 = 𝑐𝑎𝑟𝑑{𝑥𝑘 |𝑥𝑘 ≥ 𝑎𝑣𝑒}
1 |𝑟𝛼 −𝑚|
𝑠𝑝 = ∫0 1 − 𝑑𝛼, where 𝑟𝑎𝑛𝑔𝑒 = max(𝑥) − 𝑚 = 12.6609.
𝑟𝑎𝑛𝑔𝑒

Then we get the performance index (coverage, specificity, and V) and the optimal
membership function displayed in Fig 5.3.

7 of 8
(a) (b) (c)
Fig. 5.3 The performance index. (a) Lower bound. (b) Upper bound; and (c)Membership
function.

Similarity, we design a triangular fuzzy set A with the numeric representative as the modal
value (3.7454). The coverage, specificity and their product shown in Fig. 5.4(a) and (b) for
the determination of lower and upper bound, respectively and the final optimal triangular
membership function is depicted in Fig. 5.4(c).

(a) (b) (c)


Fig. 5.4 The performance index. (a) Lower bound. (b) Upper bound; and (c)Membership
function.
When comparing the membership function in Fig 5.3 and Fig 5.4, they are close to each
other (Fig. 5.5).

Fig. 5.5 Interval for triangular and linear model with mean and median.
As we can see from the Fig. 5.5, the triangular fuzzy set is broader than the interval-valued
fuzzy set. No matter whether we consider triangular fuzzy sets or intervals, the results are

8 of 8
close to each other when using the mean or median value as the numeric representative of
the data.

9 of 8

You might also like