Question: The question below uses the famous iris data set that contains measurements for 5 0 flow - ers from each of 3 species of iris.

The question below uses the famous iris data set that contains measurements for 50 flow- ers from each of 3 species of iris. The data can be accessed by loading the RData object called TutWk8Data.RData. The objective for this question is to use the Sepal features to distinguish the Virginica iris species from the other two species. The binary response variable is called Virginica and the two Sepal predictor variables, all in centimeters, are Sepal.Length and Sepal.Width. 2.1. Plot the feature space using a different symbol to differentiate Virginica flowers from the other species. 2.2. Fit a logistic regression model and overlay the resulting decision boundary on the plot. How many points will be misclassified? Hint: make sure your X variables are plotted on the correct axes. 2.3. Using the tree library with the default stopping criteria, fit a classification tree to these data. Plot the partitioning of the feature space and compare to the logistic regression model. 2.4. The tree package uses a different metric to what we have covered for a categorical response. Calculate the Shannon-entropy for the full data i.e. at the root node. 2.5. Use rpart to fit a full, unconstrained tree to these data and then use cost complexity pruning to prune the tree. Show the resulting tree structure and calculate the reduction in the Shannon-entropy metric for the pruned tree. 2.6. According to your pruned model: what is the probability that a flower is a Virginica iris if it has a Sepal length of 7 cm and a Sepal width of 3 cm?2.7. From these results, would you say that Virginica iris flowers have a different Sepal width to the other species?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!