|
Science Forum Index » Image Processing Forum » K-nearest neighbors?
Page 1 of 1
|
| Author |
Message |
| desktop |
Posted: Tue Apr 22, 2008 6:18 am |
|
|
|
Guest
|
I am reading about k-nearest neighbors algorithm. I have a question to
the below diagram:
http://en.wikipedia.org/wiki/Image:KnnClassification.svg
How does one define the classes before testing where the green circle
belongs?
If I have N samples belonging to either the blue box or the red triangle
how do I in the training phase define these prototype classes? |
|
|
| Back to top |
|
| Martin Leese |
Posted: Tue Apr 22, 2008 10:40 am |
|
|
|
Guest
|
desktop wrote:
Classes are defined during the training phase.
Quote: If I have N samples belonging to either the blue box or the red triangle
how do I in the training phase define these prototype classes?
If your N samples are your training set then
you know beforehand what class they belong to.
(If you don't know then you cannot use them
for training.)
--
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/ |
|
|
| Back to top |
|
| Harris |
Posted: Wed Apr 23, 2008 2:59 am |
|
|
|
Guest
|
desktop <asdfsf@asd.com> wrote in news:fukhhr$59n$1@news.net.uni-c.dk:
Quote: I am reading about k-nearest neighbors algorithm. I have a question to
the below diagram:
http://en.wikipedia.org/wiki/Image:KnnClassification.svg
How does one define the classes before testing where the green circle
belongs?
If I have N samples belonging to either the blue box or the red triangle
how do I in the training phase define these prototype classes?
Red and blue samples are the training set, i.e., their class is known beforehand. In Knn there is no
explicit training, you only test a new unknown smaple (green) against the known set (red and blue).
--
Harris |
|
|
| Back to top |
|
| |