Displaying 1 result from an estimated 1 matches for "controlfreq".
Did you mean:
control_reg
2017 Dec 02
0
How can you find the optimal number of values to randomly sample to optimize random forest classification without trial and error?
...I would do it:
control_s <- list()
patient_s <- list()for (i in 1:length(control))
control_s[[i]] <- sample(control[[i]], s)for (i in 1:length(patient))
patient_s[[i]] <- sample(patient[[i]], s)
Once I do this, I generate the frequency vector of length 100 as follows:
controlfreq <- list()for (i in 1:length(control_s)){
controlfreq[[i]] <-
as.data.frame(prop.table(table(factor(
control_s[[i]], levels = 1:100
))))[,2]}
patientfreq <- list()for (i in 1:length(patient_s)){
patientfreq[[i]] <-
as.data.frame(prop.table(table(factor(
patien...