Ask a question to Desklib · AI bot

Ask NowBETA

Write a program that learns a decision tree with the ID3

Added on -2019-09-18

| 1 pages
| 211 words
| 135 views

Trusted by 2+ million users,
1000+ happy students everyday

Write a program that learns a decision tree with the ID3 algorithm. Use your program with the given training data (see the cardata on our website). What is your result tree? How are the instances distributed in the leaf nodes? Output your learned tree and the distribution of instances in the nodes in an XML-format similar to the one shown below. The solution must be sent until 08:00 am on Monday the 21st of November 2016.<?xml version="1.0" encoding="UTF-8" standalone="no"?> <tree classes="class1:123,class2:234,class3:345" entropy="0.123"><node classes="class1:23,class2:123" entropy="0.234" attr1="value1"><node classes="class1:23" entropy="0.0" attr2="value1">class1</node><node classes="class2:123" entropy="0.0" attr2="value2">class2</node></node> <node classes="class1:34,class2:45,class3:56" entropy="0.345" attr1="value2"> ...</node>...</tree>You can see the car data in the attachment.

Found this document preview useful?

You are reading a preview
Upload your documents to download
or
Become a Desklib member to get accesss

Students who viewed this