How did you guys complete the matplotlib exercise
How did you guys complete the matplotlib exercise
I' m not sure how to go about plotter the xor scatter plot. I've only been learning python intensively over the last two weeks, so i am loaded up on raw knowledge, but I'm lacking in the experience necessary to make certain connections between raw knowledge and applications apparent at this point. Despite my best reasoning on what has been covered, i can't complete this task. I assume this exercise requires the use of some loop and conditional statement, but despite trying over and over things that make sense to me, I only get the wrong outputs or errors. Please help, thank you.

 Posts: 1
 Joined: Mon May 25, 2020 6:00 pm
Re: How did you guys complete the matplotlib exercise
The way I did it is generate random samples (say 1000) from the uniform distribution. Then I equally divided those points to 4 quadrants (250 points per quadrant in this case). We have to add/subtract 1 to the coordinates according to the quadrant. Now we have set of points in 4 quadrants. Each quadrant is given a target value (Quadrants 1 and 3 have target 0 and Quadrants 2 and 4 have target 1).