positive_X = [data[1] for index,data in enumerate(X) if y[index]==1]
positive_y = [data[0] for index,data in enumerate(X) if y[index]==1]
negative_X = [data[1] for index,data in enumerate(X) if y[index]==-1]
negative_y = [data[0] for index,data in enumerate(X) if y[index]==-1]
// Plotting the SVM decision boundary.
plt.plot(positive_X, positive_y, "+", label="Positive")
After Change
// Displaying the desired values.
if step_idx % 100 ==0:
print("Step //%d, training accuracy= %% %.2f, testing accuracy= %% %.2f " % (step_idx, float(100 * train_acc_step), float(100 * test_acc_step)))
if FLAGS.is_evaluation:
[[w1], [w2]] = sess.run(W)