Answered step by step
Verified Expert Solution
Question
1 Approved Answer
We consider the built-in iris data set in R. It consists of four numerical predictors and one categorical response: Sepal.Length: numeric Sepal. Width: numeric Petal.Length:
We consider the built-in iris data set in R. It consists of four numerical predictors and one categorical response: Sepal.Length: numeric Sepal. Width: numeric Petal.Length: numeric Petal. Width: numeric Species: categorical (setosa, versicolor, virginica) petal sepal sepal Sepal and petal of iris virginica. We build a decision tree model that predicts the Species of the plant by means of the numeric predictors with standard settings. > library(tree) > tree.model plot(tree.model) > text (tree.model) Compute the confusion matrix and the accuracy on the training set (Hint: Use the predict and table functions) Answer: We consider the built-in iris data set in R. It consists of four numerical predictors and one categorical response: Sepal.Length: numeric Sepal. Width: numeric Petal.Length: numeric Petal. Width: numeric Species: categorical (setosa, versicolor, virginica) petal sepal sepal Sepal and petal of iris virginica. We build a decision tree model that predicts the Species of the plant by means of the numeric predictors with standard settings. > library(tree) > tree.model plot(tree.model) > text (tree.model) Compute the confusion matrix and the accuracy on the training set (Hint: Use the predict and table functions)
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