Description Usage Arguments Value Author(s) See Also Examples
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.
1 | isregression(y, regression = FALSE)
|
y |
label vector for which the kind of problem should be estimated |
regression |
if |
TRUE, if this is a regression problem or the argument regression
was TRUE, otherwise FALSE
Jan Saputra Mueller
1 2 3 4 5 6 | ## 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!
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.