Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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 forest

Explanation / 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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote