Question
Implement a decision tree classifier You are an incredibly talented gardner, but you really need to work on your ability to identify different plants. Three
Implement a decision tree classifier
You are an incredibly talented gardner, but you really need to work on your ability to identify different plants. Three flowers in your garden look incredibly similar: Iris-setosa, Iris-virginica, and Iris-versicolor. They look so similar that you decide to use your computer science knowledge to write a classifier that tells you which flower is which. You will be implementing a decision tree classifier for flower classification data.
The dataset required (name Iris.data) is here:
https://pastebin.com/raw/Km7cHCR2
The first four values in each line of this dataset are the values of each of the following four attributes repectively: sepal length, sepal width, petal length, petal width. The last value is the class label: "Iris-setosa", "Iris-viriginica", or "Iris-versicolor."
--------------
Using the provided starter code, implement a decision tree classifier. You should implement the train() function before the classify() function. These two functions are required as written in order to test your code. You are free to implement a decision tree however you wish, as long as you write the algorithm from scratch. Do not use premade packages such as scikit-learn.
I've pasted the starter code here (already formatted).
https://pastebin.com/raw/4bgdnJgW
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started