Hi All,
Kindly help me with a question. My colleagues and I are running the code below using the train function. We are using the most up to date R Studio version, most update to date R version, and all of our libraries are the newest version. We get different results. For example, the highest accuracy I get is with MTRY of 50 in bold below. When they run the same code, they get an MTRY of 100 as having the highest accuracy. I'm sure you will get 100 when you run the code below. What explains the difference?
Quick notes: takes about 5 minutes for the script to run. I have also provided my session info
library(dslabs)
library(rpart)
data("tissue_gene_expression")
set.seed(1991)
x <- tissue_gene_expression$x
y <- tissue_gene_expression$y
set.seed(1991)
fit <- with(tissue_gene_expression,
train(x, y, method = "rf",
nodesize = 1, tuneGrid = data.frame(mtry = seq(50, 200, 25))))
fit$results
mtry Accuracy Kappa AccuracySD KappaSD
#1 50 0.9969167 0.9963149 0.008020859 0.009554839
#2 75 0.9940750 0.9928824 0.010599365 0.012700530
#3 100 0.9953688 0.9944118 0.010914864 0.013159516
#4 125 0.9955857 0.9946730 0.011409477 0.013757460
#5 150 0.9939767 0.9927032 0.014178379 0.017140433
#6 175 0.9921557 0.9905142 0.015418882 0.018628942
#7 200 0.9921557 0.9904997 0.014873157 0.017973473