Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions scripts/builtin/l2svm.dml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ m_l2svm = function(Matrix[Double] X, Matrix[Double] Y, Boolean intercept = FALSE
num_min = sum(Y == check_min)
num_max = sum(Y == check_max)

# TODO make this a stop condition for l2svm instead of just printing.
if(num_min + num_max != nrow(Y))
print("L2SVM: WARNING invalid number of labels in Y: "+num_min+" "+num_max)
stop("L2SVM: Invalid number of labels in Y. Expected binary labels but found: "+num_min+" "+num_max+" (total should be "+nrow(Y)+")")

# Scale inputs to -1 for negative, and 1 for positive classification
if(check_min != -1 | check_max != +1)
Expand Down
Loading