Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Follow the steps to produce predictions: Introduction: The iris data set gives the measurements in centimeters of the variable's sepal length and width and

1. Follow the steps to produce predictions:

Introduction:

The iris data set gives the

measurements in centimeters of the variable's sepal length and

width and petal length and width, respectively, for 50 flowers

from each of 3 species of iris.The species are _Iris setosa_,

_versicolor_, and _virginica_.

In R:

>library(class)

>tidx <- sample(nrow(iris),round(.6*nrow(iris)))

>train <- iris[tidx,-5]

>test <- iris[-tidx,-5]

>cl <- iris[tidx,5]

>orig <- iris[-tidx,5]

>pred <- knn(train,test,cl,k=3,prob=TRUE)

# Use the table below to build your confusion matrix

table(orig,pred)

2.Answer the following questions:

2.1 What method was used to provide the predictions?

2.2What is the role of the variable cl?

2.3Use the table generated above to produce your measures of performance and provide them below.

2.4What did you predict? How did the method perform? Discuss your findings...

3. Provide reference with correct APA.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mathematical Applications For The Management, Life And Social Sciences

Authors: Ronald J. Harshbarger, James J. Reynolds

12th Edition

978-1337625340

More Books

Students also viewed these Mathematics questions

Question

In Exercises 1558, find each product. (2x - 3)(5x + 3)

Answered: 1 week ago

Question

Describe two types of supply chain strategies

Answered: 1 week ago