R/reptile_train_one_mode.R

reptile_train_one_mode <-
function (epimark, label, family, ntree, nodesize) 
{
    if (family == "Logistic") {
        df <- data.frame(label = as.numeric(as.character(label)), 
            epimark)
        mod <- glm(label ~ ., data = df, family = binomial)
    }
    else {
        suppressPackageStartupMessages(requireNamespace("randomForest", 
            quietly = TRUE))
        mod <- randomForest::randomForest(epimark, label, nodesize = nodesize, 
            ntree = ntree, importance = T)
    }
    return(mod)
}

Try the REPTILE package in your browser

Any scripts or data that you put into this service are public.

REPTILE documentation built on May 2, 2019, 5:06 a.m.