bethatkinson / rpart

Recursive Partitioning and Regression Trees
43 stars 23 forks source link

the issue of reproducible results #23

Closed zaq0718 closed 3 years ago

zaq0718 commented 3 years ago

Hello, I fitted a decision tree to 9 datasets each time in three computers to have reproducible results. In the same time, I also set the seed (i.e. set.seed (1234)) in the code to make results reproducible. However, the results were the same in two out of three computers. I checked the version of R, operating system and the version of rpart. Three computers are windows and operating systems are 64 bit. The version of rpat is 4.1-15 in all three computers. The version of R is different: 3.6.1, 4.0.2 and 4.0.3 (the latest one) and the latest version of R did not show the same results as the others. Do you know whether the unreproducible results might be due to the latest version? Or, is there any way that I could fix this issue?

Thank you!

bethatkinson commented 3 years ago

Hmmm. I'm not sure what is going on. R did change their random number generator defaults, but I think that was 3.6.1. It isn't an rpart issue so much as an R issue. If you do other random number generation (like sample), can you replicate between the different systems?


From: zaq0718 notifications@github.com Sent: Wednesday, October 28, 2020 8:53 AM To: bethatkinson/rpart rpart@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [EXTERNAL] [bethatkinson/rpart] the issue of reproducible results (#23)

Hello, I fitted a decision tree to 9 datasets each time in three computers to have reproducible results. In the same time, I also set the seed (i.e. set.seed (1234)) in the code to make results reproducible. However, the results were the same in two out of three computers. I checked the version of R, operating system and the version of rpart. Three computers are windows and operating systems are 64 bit. The version of rpat is 4.1-15 in all three computers. The version of R is different: 3.6.1, 4.0.2 and 4.0.3 (the latest one) and the latest version of R did not show the same results as the others. Do you know whether the unreproducible results might be due to the latest version? Or, is there any way that I could fix this issue?

Thank you!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/bethatkinson/rpart/issues/23, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACWQG5ZWMNIO6YQLXIMZQVDSNAO53ANCNFSM4TCLLK2A.

zaq0718 commented 3 years ago

Thank you for the replay. I realized that there was a mistake (which is not relevant to rpart) that I made, and after I fixed that, the results are reproducible in three computers :)