From 272e5721f343b7754daf6d35bb9a695d4081d94e Mon Sep 17 00:00:00 2001 From: Deepthi Pathare Date: Tue, 4 May 2021 19:18:37 +0200 Subject: [PATCH] Bug fix: data used for plotting is corrected --- VotingAnalysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VotingAnalysis.py b/VotingAnalysis.py index 60cb343..68a7640 100644 --- a/VotingAnalysis.py +++ b/VotingAnalysis.py @@ -250,7 +250,7 @@ prediction = sofmnet.predict(X) print(f'prediction: {prediction}') # converting to x and y coordinates -ys, xs = np.unravel_index(np.argmax(X, axis=1), (h, w)) +ys, xs = np.unravel_index(np.argmax(prediction, axis=1), (h, w)) # plotting mps plot_mps(data[:,0], xs, ys, data[:,1]) @@ -305,7 +305,7 @@ prediction = sofmnet.predict(X) print(f'prediction: {prediction}') # converting to x and y coordinates -ys, xs = np.unravel_index(np.argmax(X, axis=1), (h, w)) +ys, xs = np.unravel_index(np.argmax(prediction, axis=1), (h, w)) # plotting mps plot_mps(data[:,0], xs, ys, data[:,1])