R/task_identifier.R

Defines functions identifyTask

Documented in identifyTask

#' Identify the type of the learning task
#' @export
#' @param target_col A vector
#' @return A string
identifyTask <- function(target_col) {

    target_class <- class(target_col)

    if (target_class == "numeric") {
        return("regression")
    } else {
        return("classification")
    }

}
jsalminen/KaggleSolveR documentation built on May 20, 2019, 5:43 p.m.