Last active
September 5, 2023 23:28
-
-
Save z1nc0r3/358290df55514ca814c495dc003419c8 to your computer and use it in GitHub Desktop.
Winner Takes All algorithm using Matlab
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 accuracy = WinnerTakesAll(actual, predict, class) | |
[m, n] = size(actual); | |
[maxP, classP] = max(predict, [], 2); | |
accuracy = 100 * sum(actual(:, n) == class(classP)') / m; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment