(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
Csis 5420 week 8 homework answers (13 jul 05)
1. CSIS 5420 Week 8 Homework – Answers
1. Briefly explain each step of the fuzzy logic inference method introduced by Mamdani
and Assilian (1975) and described on page CD-42.
The fuzzy logic inference method as described by Mamdani and Assilian can be broken down into
four steps (CD43-CD48):
A. Fuzzification: First, the initial rules are transformed into fuzzy rules. Second, the desired
numerical input variables are plotted on fuzzy set distributions and clear degrees of membership
values are calculated and recorded. Note that the input variables most likely will have
membership in more than one fuzzy set.
B. Rule Inference: Once the membership values are calculated we need to compare these
values to the rule base to see if the rules will “fire” or not. Using the values from step 1 on fuzzy
OR (maximum value) and AND (minimum value) operators we assign a value to antecedents,
even with multiple conditions. This value is used to “clip” the member functions at the height
value from the antecedent condition.
C. Rule Composition: We now combine all viable “clipped” rule functions into one complete
fuzzy set. We should easily be able to tell where this set has been affected by a particular
clipping.
D. Defuzzification: The goal of this final step is to obtain a final value using rule or statistical
methods. Probably the best method of obtaining an accurate value is to find the “center of
gravity” of the single fuzzy set.
2. In the second part of Section 13.2 (page CD-41) we defined a fuzzy set for age = young
as follows:
{(0/1.0), (5/0.90), (10/0.75), (15/0.50), (20/0.35), (30/0.10), (50/0.0)}
Use your IDA backpropagation software to train a neural network to associate an age
with a probability of membership. Test and record the network output for the following
ages:
Age = 2, 7, 25, 40, 60.
First Second
R R
I O
0 1
5 0.9
10 0.75
115 0.5
20 0.35
30 0.1
50 0
Instance First Second Computed
#1 2* 0.932
#2 7* 0.862
#3 25* 0.176
2. #4 40* 0.049
#5 60* 0.049
3. Here’s an interesting problem that can be solved with simple probability theory. You
are given three boxes, two are empty and one contains one million dollars. You are
asked to select any one of the three boxes. Next, after you are shown the empty
contents of one of the two boxes you did not choose, you must decide if you would
like to change your initial selection. Should you stay with your original choice or swap
your box for the remaining unopened box?
Let’s call our doors A, B, and C. Assume the money is behind door A (this example holds for B
and C as well by method of exhaustion). We have a P = 1/3 choice of choosing any door at
random correctly. If the prize is behind door A here are the possible outcomes of not switching
followed by switching:
1st Choice Shown Final Choice Right P
A B A Yes 0.166666667
A C A Yes 0.166666667
B C B No 0.333333333
C B C No 0.333333333
Total Yes 0.333333333
Total No 0.666666667
1st Choice Shown Final Choice Right P
A B C No 0.166666667
A C B No 0.166666667
B C A Yes 0.333333333
C B A Yes 0.333333333
Total Yes 0.666666667
Total No 0.333333333
We see that switching doors makes us twice as likely to choose the correct door as opposed to
staying put. Hence, it is better overall that we switch.
4. Use the fuzzy sets and rules defined in Section 13.2 (page CD-40) to compute a
life_insurance_accept confidence score for a 30-year-old individual who has taken
advantage of five previous promotions.
Age = 30 years
PA = 5
Rule1: Accept is High
IF Age is Young
AND PA is High
THEN LIA is High
Rule 2: Accept is Moderate
IF Age is Middle_Age
3. AND PA are Some
THEN LIFA is Moderate
Rule 3: Accept is Low
IF Age is Old
THEN LIA is Low
Step1:
Age is Young = .3
Age is Middle_Aged = .1
Age is Old = Null (Does not intersect that curve)
PA are Few = Null (Does not intersect that curve)
PA are Some = .2
PA are Several = .6
Step2:
Rule1: Accept is High
min(.3,.6) = .3
FIRES!
Rule 2: Accept is Moderate
Min(.1,.2) = .1
FIRES!
Rule 3: Accept is Low
Min (Null) = N/A
DOES NOT FIRE!
Step3:
Clip “Accept is High” to .3
Clip “Accept is Moderate” to .1
Graph of Fuzzy Set is defined by connecting the points: {(25,0),(35,.3),(55,.3),(65,.1),(100,.1)
Step4:
=[.3*(35+45+55)+.1(65+75+85+95)]/[(.2*3)+(.1*4)]
=72.5
Thus we have a confidence value of 72.5% that the customer in question is a likely candidate for
the life insurance promotion. Very Good
5. Suppose that the probability of someone liking sugar given that the person eats cereal
X is 75%.We also know that 30% of the population eats cereal X. Finally, the probability
of a person liking sugar and not eating cereal X is 40%. Use Bayes theorem to
compute the probability that a person eats cereal X given that he or she likes sugar.
P(Cereal = Yes) 0.3
P(Cereal = No) 0.7
P(Sugar = Yes | Cereal = Yes) 0.75
P(Sugar = Yes | Cereal = No) 0.4
4. 4455.
505.
225.
)7)(.4(.)3(.*)75(.
)3(.*)75(.
)(*)|()(*)|(
)(*)|(
)|(
NoCerealPNoCerealYesSugarPYesCerealPYesCerealYesSugarP
YesCerealPYesCerealYesSugarP
YesSugarYesCerealP
Thus, there is about a 45% chance that a person eats cereal X given that he or she likes sugar.
This is notably better than the 30% chance of a random person in the population liking cereal X.
6. Use the rules defined in Section 13.3 (page CD-48) together with Bayes theorem to
compute the probability that a customer aged 25 who has accepted three previous
promotions will accept the life insurance promotion.
Age = 25 years
Previous accepts = 3
Will accept life insurance promotion = ?
P(Age=25) 0.1428571432/14
P(Age<>25) 0.85714285712/14
P(PA=3) 0.2142857143/14
P(PA<>3) 0.07142857111/14
P(LI=Yes) 0.57/14
P(LI=No) 0.57/14
P(Age=25|LI=Yes) 0.2857142862/7
P(PA=3|LI=Yes) 0.2857142862/7
P(Age=25|LI=No) 00/7
P(PA=3|LI=No) 0.1428571431/7
P(LI=Yes|Age=25 & PA=3) = P(Age=25|LI=Yes) * P(PA=3|LI=Yes) * P(LI=Yes)
P(Age=25|LI=Yes) * P(PA=3|LI=Yes) * P(LI=Yes)
+ P(Age=25|LI=No) * P(PA=3|LI=No) * P(LI=No)
= 1
Thus there is a 100% probability that a 25 year old customer who has 3 previous accepts will
accept the life insurance promotion. Since this is a finite set we see there is only 1 person who
meets such conditions. It so happens that this person accepted the life insurance promotion.
This is how we practically obtain the 100% probability figure, 1 for 1.
7. Several types of agents were described Section 14.2. They were: Filtering agents,
Semiautonomous agents, Find-and-retrieve agents, User agents, Monitor-and-
surveillance agents, data mining agents, and cooperative agents. For each type of
agent, decide which one of the four common characteristics of intelligent agents:
Situatedness, Autonomy, Adaptivity, and Sociability, is the most important agent
feature. State your reason for each selection.
A. Filtering agents: Situatedness. They are adept at receiving and categorizing information, and
even doing some basic tasks based on the incoming information.
B. Semiautonomous agents: Autonomy. While not fully autonomous they certainly can work on
their own to find possible solutions to a request or query. They can make some judgments based
on criteria they are fed and can contact users so they can make the final call.
5. C. Find-and-retrieve agents: Autonomy. While not fully autonomous they play a mean game of
fetch. I imagine they have some features built in to allow for more autonomous thought such as
filtering based on context, relevancy, and time.
D. User agents: Sociability. The goal of user agents is to help aid the user in some form or
fashion. They must be able to provide suggestions and solutions to a user and change their
output based on further user input.
E. Monitor-and-surveillance agents: Situatedness. They scour the web monitoring the changes
in certain types of information. They also have the power to communicate to humans and provide
basic reports such as exception reports.
F. Data mining agents: Adaptivity. They are very intelligent and actually are drivers for change.
They can create trends, note changes, and even suggest actions.
G. Cooperative agents: Sociability. They work based on learning and communicating with other
individuals and agents.