repeat

R: how to repeatedly “loop” the results from a function?

别来无恙 提交于 2020-12-14 12:10:34
问题 I have written some code in R. This code takes some data and splits it into a training set and a test set. Then, I fit a "survival random forest" model on the training set. After, I use the model to predict observations within the test set. Due to the type of problem I am dealing with ("survival analysis"), a confusion matrix has to be made for each "unique time" (inside the file "unique.death.time"). For each confusion matrix made for each unique time, I am interested in the corresponding

How to Create a loop (when levels do not overlap the reference)

孤街醉人 提交于 2020-12-14 12:09:29
问题 I have written some code in R. This code takes some data and splits it into a training set and a test set. Then, I fit a "survival random forest" model on the training set. After, I use the model to predict observations within the test set. Due to the type of problem I am dealing with ("survival analysis"), a confusion matrix has to be made for each "unique time" (inside the file "unique.death.time"). For each confusion matrix made for each unique time, I am interested in the corresponding

R: how to repeatedly “loop” the results from a function?

青春壹個敷衍的年華 提交于 2020-12-14 12:05:41
问题 I have written some code in R. This code takes some data and splits it into a training set and a test set. Then, I fit a "survival random forest" model on the training set. After, I use the model to predict observations within the test set. Due to the type of problem I am dealing with ("survival analysis"), a confusion matrix has to be made for each "unique time" (inside the file "unique.death.time"). For each confusion matrix made for each unique time, I am interested in the corresponding

How to Create a loop (when levels do not overlap the reference)

喜夏-厌秋 提交于 2020-12-14 12:04:40
问题 I have written some code in R. This code takes some data and splits it into a training set and a test set. Then, I fit a "survival random forest" model on the training set. After, I use the model to predict observations within the test set. Due to the type of problem I am dealing with ("survival analysis"), a confusion matrix has to be made for each "unique time" (inside the file "unique.death.time"). For each confusion matrix made for each unique time, I am interested in the corresponding

How to Create a loop (when levels do not overlap the reference)

。_饼干妹妹 提交于 2020-12-14 12:03:55
问题 I have written some code in R. This code takes some data and splits it into a training set and a test set. Then, I fit a "survival random forest" model on the training set. After, I use the model to predict observations within the test set. Due to the type of problem I am dealing with ("survival analysis"), a confusion matrix has to be made for each "unique time" (inside the file "unique.death.time"). For each confusion matrix made for each unique time, I am interested in the corresponding

To check if a value in a row is repeated between groups in R

喜夏-厌秋 提交于 2020-12-06 06:06:11
问题 I have a dataset containing purchases made by different households across different retailers. For eg Example Dataset Using dput() structure(list(household_code = c(76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 126, 126, 126, 126, 126, 126, 126, 126, 126), trip_code_uc = c(1032497498L, 1025776063L, 1029419047L, 1030418100L, 1029502602L, 1034153056L, 1027035051L, 1027533991L, 1033515804L, 1032998207L, 1032066227L, 1028192785L, 1033419039L, 1028730296L,