Reference no: EM133036493
Assignment: Fuzzify a Decision Tree
Description: This assignment mixes theory and application, in the form of two problems. Perform the tasks described in each. Note that this (and other) assignments includes a few challenging research-related tasks. They are aimed at gradually building your capacity to tackle complex topics, familiarize yourself with academic discourse, and provide context and practice for the skills you will eventually need when working on your capstone thesis or project.
APA style is expected, as well as formal and rigorous scientific writing, using appropriate mathematical notation and references.
Part 1 - Decisions
People decide to drive a car or use public transportation to commute to work by weighing in such factors as weather and traffic. The following table describes the dataset D, containing data collected over a period of 14 days. The attributesare Temperature (x1),Wind (x2), and Traffic-Jam (x3); and the target variable is Car DrivingDecision (y).
Day s(i)
|
Temperature xi
|
Wind x2
|
Traffic-Jam x3
|
Car Driving y
|
s(1)
|
hot
|
weak
|
long
|
no
|
s(2)
|
hot
|
strong
|
long
|
no
|
s(3)
|
hot
|
weak
|
long
|
yes
|
s(4)
|
mild
|
weak
|
long
|
yes
|
s(5)
|
cool
|
weak
|
short
|
yes
|
s(6)
|
cool
|
strong
|
short
|
no
|
s(7)
|
cool
|
strong
|
short
|
yes
|
s(8)
|
mild
|
weak
|
long
|
no
|
s(9)
|
cool
|
weak
|
short
|
yes
|
s(10)
|
mild
|
weak
|
short
|
yes
|
s(11)
|
mild
|
strong
|
short
|
yes
|
s(12)
|
mild
|
strong
|
long
|
yes
|
s(13)
|
hot
|
weak
|
short
|
yes
|
s(14)
|
mild
|
strong
|
long
|
no
|
Note that on 9 days, the decision is made to drive a car, whereas on the remaining 5 days, the decision is negative about driving a car.
You are tasked to create a decision tree that uses the above data to compute the decision on whether to drive a car, given the conditions depicted by the three variables in the table.
Consult the decision tree package, and using a Jupyter notebook, implement the following in Python:
a. Calculate the information gain for x1, x2 and x3.
b. Choose the root node for the decision tree.
c. Plot a partial decision tree from root node along with training examples sorted to each of its descendent nodes.
d. You are required to continue with the decision-tree growing process until all nodes are pure(they contain examples that all have the same classification).
e. Will it be possible to reach this situation for the given dataset? If not, why not? (Hint: Look for inconsistencies in the given dataset.)
f. Summarize the entire work in a technical report.
Part 2 - Fuzzy Decisions
You are tasked to modify the classifier tree in Part 1 so that it better mimics the way a human makes decisions. You will accomplish this by transforming the decision tree into a fuzzy decision tree.
In addition to the readings assigned in this topic, you may find it useful to read the techniques described in the "Combined Application of Decision Tree and Fuzzy Logic Techniques for Intelligent Grading of Dried Figs."
Answer the following and provide necessary Python code to help visualize your model:
a. Explain how you will fuzzify the attributes x1, x2 and x3.
b. Choose the root node for the fuzzy decision tree and defend your choice.
c. Plot a partial fuzzy decision tree from root node along with training examples sorted to each of its descendent nodes. Assume the dataset to be crisp, i.e., all membership functions satisfy:
µD(s(i)) = 1
d. As with Part 1, create a second report, detailing your approach to fuzzification of the decision tree.