0% found this document useful (0 votes)
9 views166 pages

Week12 Softcomp

The document discusses various concepts related to soft computing techniques, including fuzzy neurons, activation functions, and the Sugeno ANFIS model. It provides calculations for firing strengths, outputs, and total errors based on given weights and inputs. Additionally, it covers the probability of movement for ants in a city based on pheromone and heuristic values.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views166 pages

Week12 Softcomp

The document discusses various concepts related to soft computing techniques, including fuzzy neurons, activation functions, and the Sugeno ANFIS model. It provides calculations for firing strengths, outputs, and total errors based on given weights and inputs. Additionally, it covers the probability of movement for ants in a city based on pheromone and heuristic values.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 166

Soft Computing Techniques

Week-12 Assignment-12 (Solution)

1. (b). AND fuzzy neurons: These neurons use T-norms to model the logical AND operation. A common
T-norm is min, which aggregates the inputs by taking the smallest value.
OR fuzzy neurons: These neurons use T-conorms (also called S-norms) to model the logical OR
operation. A common T-conorm is max, which aggregates the inputs by taking the largest value.
Thus, the distinction lies in the type of aggregation function used:
AND → T = min (T-norm for conjunction),
OR → S = max (T-conorm for disjunction).

2. (c). In Layer 2 of Sugeno ANFIS, the primary function of each node is to calculate the firing strength
of each rule using the fuzzy operations.

3. (d). Dendrites receive signals from other neurons and transmit them to the cell body

4. (c). The range of the hyperbolic tangent activation function is (-1,1) and that of the sigmoid activation
function is (0,1).

5. (d). From the given figure, we have,


w1 = 0.15, w2 = 0.20, w3 = 0.25, w4 = 0.30, w5 = 0.40, w6 = 0.45, w7 = 0.50, w8 = 0.55
and
i1 = 0.05, i2 = 0.1, b1 = 0.35, o1 = 0.01, o2 = 0.99, b2 = 0.60
Then neth1 , neth2 , outh1 and outh2 is given by,
neth1 = w1 i1 + w2 i2 + b1
= 0.15 × 0.05 + 0.2 × 0.1 + 0.35
=⇒ neth1 = 0.3775
neth2 = w3 i1 + w4 i2 + b1
= 0.25 × 0.05 + 0.3 × 0.1 + 0.35
=⇒ neth2 = 0.3925
1
outh1 =
1 + e−neth1
1
= −0.3775
1+e
=⇒ outh1 = 0.593269992
=⇒ outh1 ≈ 0.5933
1
outh2 =
1 + e−neth2
1
=
1 + e−0.3925
=⇒ outh2 = 0.596884378
=⇒ outh2 ≈ 0.5969
6. (a). From the figure given in question 5, neto1 , neto2 , outo1 and outo2 is given by,

neto1 = w5 × outh1 + w6 × outh2 + b2


= 0.40 × 0.5933 + 0.45 × 0.5969 + 0.60
=⇒ neto1 ≈ 1.1059
neto2 = w7 × outh1 + w8 × outh2 + b2
= 0.50 × 0.5933 + 0.55 × 0.5969 + 0.60
=⇒ neto2 ≈ 1.2249
1
outo1 =
1 + e−neto1
1
= −1.1059
1+e
=⇒ outo1 = 0.75136395481
=⇒ outo1 ≈ 0.7514
1
outo2 =
1 + e−neto2
1
= −1.2249
1+e
=⇒ outo2 = 0.77292470866
=⇒ outo2 ≈ 0.7729

7. 0.2984, range is 0.29 to 0.30. For the figure given in question 5, Etotal is given by,
X1
Etotal = (target − output)2 = Eo1 + Eo2
2
1
=⇒ Eo1 = (0.01 − 0.7514)2
2
=⇒ Eo1 = 0.27483698
1
and Eo2 = (0.99 − 0.7729)2
2
=⇒ Eo2 = 0.02356620
=⇒ Etotal = 0.27483698 + 0.02356620
=⇒ Etotal ≈ 0.2984

8. (c). For the figure given in question 5, If we want to check the effect of w7 on the total error
then ∂E
∂outo2 is given by
total

∂Etotal ∂
= (Eo1 + Eo2 )
∂outo2 ∂outo2
1 ∂ 1 ∂
= (targeto1 − outo1 )2 + (targeto2 − outo2 )2
2 ∂outo2 2 ∂outo2
1 1 
= ×0+ 2 × (targeto2 − outo2 ) × (−1)
2 2
∂Etotal
=⇒ = outo2 − targeto2
∂outo2
9. 0.1755, range is 0.17 to 0.18. For the figure given in question 5, if we want to check the effect of w7 on
∂outo2
the total error then the value of ∂net o2
is given by,
1
outo2 =
1 + e−neto2
∂outo2 ∂  1 
=⇒ =
∂neto2 ∂neto2 1 + e−neto2
1
Let y=
1 + e−x
dy e−x
=⇒ =
dx (1 + e−x )2
1  1 
= 1 −
1 + e−x 1 + e−x
dy
=⇒ = y(1 − y)
dx
∂outo2
=⇒ = outo2 (1 − outo2 )
∂neto2

Using the value of outo2 we have found in question 6, we get,


∂outo2
= 0.7729(1 − 0.7729)
∂neto2
which gives
∂outo2
≈ 0.1755
∂neto2

10. 0.5933, range is 0.59 to 0.60. For the figure given in question 5, if we want to check the effect of w7 on
the total error then the value of ∂net
∂w7 is given by,
o2

neto2 = w7 × outh1 + w8 × outh2 + b2


∂neto2 ∂  
=⇒ = w7 × outh1 + w8 × outh2 + b2
∂w7 ∂w7
∂neto2
=⇒ = outh1 + 0 + 0
∂w7

Now, using the value of outh1 we have found in question 5, we get,


∂neto2
= 0.5933
∂w7

11. -0.0226, range is -0.03 to -0.02. For the figure given in question 5, if we want to check the effect of w7
on the total error then the value of ∂E∂w
total
7
is given by,

Etotal = Eo1 + Eo2


∂Etotal ∂Eo2
=⇒ =0+
∂w7 ∂w7
∂Etotal ∂Eo2 ∂outo2 ∂neto2
=⇒ = × ×
∂w7 ∂outo2 ∂neto2 ∂w7
From question 8, we have,
∂Etotal
= outo2 − targeto2
∂outo2

Using the values of outo2 from question 6, and that of targeto2 from the figure given in question 5, we
get,
∂Etotal
= 0.7729 − 0.99 = −0.2171
∂outo2
Now, using the values we have found in question 9 and 10, we get,
∂Etotal
= −0.2171 × 0.1755 × 0.5933
∂w7
which gives
∂Etotal
≈ −0.0226
∂w7

12. 0.5113, range is 0.510 to 0.515. For the data we have found in question 11, w7+ is given by,

∂Etotal
w7+ = w7 − η ×
∂w7
= 0.5 − 0.5 × (−0.0226)
=⇒ w7+ ≈ 0.5113

13. (d). The formula for the probability of an ant moving from city i to city j is given by,

(τi,j )α (ηi,j )β
Pi,j = P α β
k∈ allowed cities (τi,k ) (ηi,k )

14. (b). For the given data, the probabilities that an ant starts to move from city c are given by,

(τi,j )α (ηi,j )β
Pi,j = P α β
k∈ allowed cities (τi,k ) (ηi,k )
1 × 91
=⇒ Pca =
1 × 1 + 1 × 91 + 1 × 1
3
=⇒ Pca ≈ 0.0769
1 × 11
Pcb =
1 × 1 + 1 × 91 + 1 × 1
3
=⇒ Pcb ≈ 0.6923
1 × 13
Pcd =
1 × 1 + 1 × 91 + 1 × 1
3
=⇒ Pcd ≈ 0.2308

15. (c). From question 14, we have found that the probability of moving an ant from c to b is greater than
a and d. Therefore, the next city will be b.

You might also like