Given the next R code: data(iris) library(ggplot2) inTRain=createDataPartition(y
ID: 3838903 • Letter: G
Question
Given the next R code: data(iris) library(ggplot2) inTRain=createDataPartition(y=iris$Species, p=0.7.list=FALSE) training=iris[inTRain.] testing=iris[-inTRain, ] modfit=train(Species ., data=training, method="rf', prox=TRUE) modfit pred=predict(modfit, testing) testing$predRight=(pred==testing$Species) table(pred, testing$Species) You are asked to run the code, (you may have an error due to missing package(s), then you should install them and run the code. Indicate what machine learning method is being used in the code Singular value decomposition Decision Trees Principal component Analysis Random forestExplanation / Answer
Answer is random forest
We can see in code we have used train function which is specifying method for machine learing which is rf. That is random forest
Refer documentatin for train method here : https://topepo.github.io/caret/available-models.html
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.