Skip to content

Commit

Permalink
ClassificationSVM: fix labeling to 'libsvm' library
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0m1th3as committed Aug 19, 2024
1 parent d8e71d0 commit 6e28387
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions inst/Classification/ClassificationSVM.m
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,7 @@
## Force Y labels to -1 and +1 to avoid numeric issues with different
## compiling options; see https://github.com/cjlin1/libsvm/issues/220
if (nclasses == 2)
Y(Y == 1) = -1;
Y(Y == 2) = +1;
Y(Y == 2) = -1;
endif

## Check X contains valid data
Expand Down

0 comments on commit 6e28387

Please sign in to comment.