Skip to content

Instantly share code, notes, and snippets.

@z1nc0r3
Created September 5, 2023 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save z1nc0r3/c71d447129bfbc3bee4cf606b68e2369 to your computer and use it in GitHub Desktop.
Save z1nc0r3/c71d447129bfbc3bee4cf606b68e2369 to your computer and use it in GitHub Desktop.
Invert Data for SVM
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