Created
September 5, 2023 23:38
-
-
Save z1nc0r3/c71d447129bfbc3bee4cf606b68e2369 to your computer and use it in GitHub Desktop.
Invert Data for SVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function data = invertData(data, class) | |
indices = (data(:, end) == class); | |
data(indices, end) = 1; | |
data(~indices, end) = -1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment