![]() |
PLA: Let share nice visualizations
Hi!
I think all of us plotted different pictures. Some of them are very nice. For example I get this for PLA learning on N=20. What nice visualisations do you have? http://vakhov.me/exchange/pla-20.png |
Re: PLA: Let share nice visualizations
I don't think it's sharing answers to homework if we exchange code for plotting. Am new to Octave and not having the best luck getting nice-looking plots so far. Would be thrilled to get just the snippet of code people use for visualizing different solutions.
|
Re: PLA: Let share nice visualizations
I'm just going to paste the Octave code right here. Hope that's OK.
This is code to display the current state of the perceptron, displaying the true separating line, the current hypothesis and all the points. Wrongly classified points are big; rightly classified points are little. Optionally, you can specify the new hypothesis and the currently selected misclassified point, and then they too will be displayed. When I call this function, I put a pause statement afterwards, so I can step through the algorithm watching it move the hypothesis line and reclassify all the points. For some reason I'm getting a divide by zero warning for the statements with && in them. I ignore it. Code:
function draw_percept(points,hypothesis, predictions, true_line, target, bad, new_h) |
Re: PLA: Let share nice visualizations
Wow, nice figure. I didn't visualize it like that. I chose to make an animation of the process
|
Re: PLA: Let share nice visualizations
Please, good sir, do share it :)
|
Re: PLA: Let share nice visualizations
Here is a visualization of the algorithm with n=50 points. The point in the circle is the chosen misclassified point in the current iteration. The final yellow line is the selected hypothesis.
|
Re: PLA: Let share nice visualizations
Quote:
|
Re: PLA: Let share nice visualizations
I never did any plots.
I did a few drawings with a few points on them to understand the geometry, and once I understood that, believed in the equations. But sometimes plots are nice to see what it is really doing. |
Re: PLA: Let share nice visualizations
Thanks Anne for sharing your code. Helped me pick up a few things that I was able to use to produce my own plots.
|
Re: PLA: Let share nice visualizations
|
All times are GMT -7. The time now is 02:59 AM. |
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.