Starting from:

$30

INF552-Homework 1 Decision Trees Solved

Part 1: Implementation  
 Your job in this exercise is to predict whether you will have a good night-out in Jerusalem for the coming New Year's Eve. Assume that you have kept a record of your previous night-outs with the following attributes.

•       How densely the place is usually occupied {High, Moderate, Low}

•       How the prices are {Expensive, Normal, Cheap}

•       Volume of the music {Loud, Quiet}

•       The location {Talpiot, City-Center, Mahane-Yehuda, Ein-Karem, German-Colony}

•       Whether you are a frequent customer (VIP) {Yes, No}

•       Whether this place has your favorite beer {Yes, No}

•       Whether you enjoyed {Yes, No}

 

We have provided a data file (dt_data.txt) that contains the relevant records.

 

(a)  Write a program to construct a decision tree based on the idea of splitting by Information Gain.

(b)  Run your program on the data file.

(c)  Make a prediction for (occupied = Moderate; price = Cheap; music = Loud; location = City-Center; VIP = No; favorite beer = No).

 

You can write your program in any programming language. However, you will have to implement the decision tree learning algorithm yourself instead of using library functions. Provide a

 

Your code should print the decision tree that it produces. Please describe the format in which you print the decision tree in your report.

 

 

description of the data structures you use, any code-level optimizations you perform, any challenges you face, and of course, the requested prediction.

Part 2: Software Familiarization
 

Do your own research and find out about a library function that offers a good implementation of the decision tree learning algorithm. Please learn how to use it. Compare it against your implementation and suggest some ideas for how you can improve your code. Describe all these in your report.

 

 

Part 3: Applications  

 

Do your own research and describe some interesting applications of decision trees.

More products