isregression {rdetools} | R Documentation |
Estimates whether this is a regression or classification problem by looking at the labels. If all labels are only -1 and 1 a classification problem is assumed, otherwise a regression problem. If the argument 'regression' is TRUE, the function always returns TRUE.
isregression(y, regression = FALSE)
y |
label vector for which the kind of problem should be estimated |
regression |
if regression is TRUE, the function returns always TRUE,
if you want an estimation leave this FALSE |
TRUE, if this is a regression problem or the argument regression
was TRUE, otherwise FALSE
Jan Saputra Mueller
## some examples y_cl <- c(-1, 1, 1, -1, 1) # label vector for classification problem y_reg <- runif(5) # label vector for regression problem isregression(y_cl) # FALSE! isregression(y_cl, regression = TRUE) # Always TRUE! isregression(y_reg) # TRUE!