aboutsummaryrefslogtreecommitdiff
path: root/R/gensvm.grid.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/gensvm.grid.R')
-rw-r--r--R/gensvm.grid.R6
1 files changed, 3 insertions, 3 deletions
diff --git a/R/gensvm.grid.R b/R/gensvm.grid.R
index 8f875a3..c541ea0 100644
--- a/R/gensvm.grid.R
+++ b/R/gensvm.grid.R
@@ -157,8 +157,8 @@ gensvm.grid <- function(X, y, param.grid='tiny', refit=TRUE, scoring=NULL, cv=3,
n.classes <- length(unique(y))
if (n.objects != length(y)) {
- cat("Error: X and y are not the same length.\n")
- invisible(NULL)
+ cat("Error: x and y are not the same length.\n")
+ return(invisible(NULL))
}
if (is.character(param.grid)) {
@@ -173,7 +173,7 @@ gensvm.grid <- function(X, y, param.grid='tiny', refit=TRUE, scoring=NULL, cv=3,
# Validate the range of the values for the gridsearch
if (!gensvm.validate.param.grid(param.grid))
- invisible(NULL)
+ return(invisible(NULL))
# Sort the parameter grid for efficient warm starts
param.grid <- gensvm.sort.param.grid(param.grid)