Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We obtained a dataset Animal to develop two models: Model 1 and Model 2 , which are used to predict the value of Type. We

We obtained a dataset Animal to develop two models: Model1 and Model2, which are used to predict the value of Type. We have loaded the data to object Animal into software and compared the performance of the two models. Model outputs are shown as below. Based on the outputs, which of the statements is(are) true? > dim(Animal)[1]1000016> contrasts(Type) ReptileAmphibian 0Reptile 1> trainTree = sample(1:nrow(Animal), nrow(Animal)*0.7)> Animal.train = Animal[trainTree,]> Animal.test = Animal[-trainTree, ]> train.truevalue=Type[trainTree]> test.truevalue=Type[-trainTree]> Model1=randomForest(Type ~ ., data = Animal.train, mtry=4,importance=TRUE)> Model1.pred.train = predict(Model1,Animal.train)> mean(Model1.pred.train==train.truevalue)[1]0.90> Model1.pred.test= predict(Model1,Animal.test)> mean(Model1.pred.test==test.truevalue)[1]0.83> Model2=randomForest(Type ~ ., data = Animal.train, mtry=15,importance=TRUE)> Model2.pred.train = predict(Model2,Animal.train)> mean(Model2.pred.train==train.truevalue)[1]0.98> Model2.pred.test= predict(Model2,Animal.test)> mean(Model2.pred.test==test.truevalue)[1]0.81

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

Step: 3

blur-text-image

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

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

Who will receive the final evaluation?

Answered: 1 week ago