Answered step by step
Verified Expert Solution
Question
1 Approved Answer
[Preliminary work] Use from sklearn.datasets import load_iris to get the Iris data. When you can write iris = load_iris() in a Python program, the Iris
[Preliminary work] Use from sklearn.datasets import load_iris to get the Iris data. When you can write iris = load_iris() in a Python program, the Iris data is stored in the iris variable. See what the Iris data contains using, for example, print(iris).
Data can be found at Index of /ml/machine-learning-databases/iris
Look for iris.data, may need to change to a .csv file
I just need the codes.
Write a Python program in Bagging_Iris.py to perform the decision tree algorithm with bagging using "from sklearn.ensemble import BaggingClassifier", as demonstrated in class. This Python program should graph score vs. N, where N is the number of estimators. Try 2 N20 Use N=3. Is this value reasonable? Write a Python program in Draw_DT.py to graph the three decision tree diagrams using "from sklearn.tree import plot_tree". Is the number of out-of-bag samples reasonable? Why? Write a Python program in Bagging_Iris.py to perform the decision tree algorithm with bagging using "from sklearn.ensemble import BaggingClassifier", as demonstrated in class. This Python program should graph score vs. N, where N is the number of estimators. Try 2 N20 Use N=3. Is this value reasonable? Write a Python program in Draw_DT.py to graph the three decision tree diagrams using "from sklearn.tree import plot_tree". Is the number of out-of-bag samples reasonable? WhyStep 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