%SHOW THE DECISION THAT LINEAR CLASSIFIER w MAKES ON TRAINING DATA (X,Y) Y_hat = sign(w_learned'*X); %classify inputs scatter3(X(1,:),X(2,:),X(3,:), 80, Y_hat, 'filled'); %visualize the model's decisions drawnow; sum(Y_hat~=Y)/size(X,2) %show error rate