03 KNN
03 KNN
Neighbor
&
Instance-‐based
Learning
2
1-‐Nearest
Neighbor
n A
type
of
instance-‐based
learning
n Also
known
as
“memory-‐based”
learning
n Forms
a
Voronoi
tessellaNon
of
the
instance
space
3
Distance
Metrics
n Different
metrics
can
change
the
decision
surface
Dist(a,b) =(a1 – b1)2 + (a2 – b2)2 Dist(a,b) =(a1 – b1)2 + (3a2 – 3b2)2
LONDON
(Reuters)
-‐-‐
For
centuries
visitors
to
the
renowned
Ryoanji
Temple
garden
in
Kyoto,
Japan
have
been
entranced
and
mysNfied
by
the
simple
arrangement
of
rocks.
The
five
sparse
clusters
on
a
rectangle
of
raked
gravel
are
said
to
be
pleasing
to
the
eyes
of
the
hundreds
of
thousands
of
tourists
who
visit
the
garden
each
year.
ScienNsts
in
Japan
said
on
Wednesday
they
now
believe
they
have
discovered
its
mysterious
appeal.
"We
have
uncovered
the
implicit
structure
of
the
Ryoanji
garden's
visual
ground
and
have
shown
that
it
includes
an
abstract,
minimalist
depicNon
of
natural
scenery,"
said
Gert
Van
Tonder
of
Kyoto
University.
The
researchers
discovered
that
the
empty
space
of
the
garden
evokes
a
hidden
image
of
a
branching
tree
that
is
sensed
by
the
unconscious
mind.
"We
believe
that
the
unconscious
percepNon
of
this
paBern
contributes
to
the
enigmaNc
appeal
of
the
garden,"
Van
Tonder
added.
He
and
his
colleagues
believe
that
whoever
created
the
garden
during
the
Muromachi
era
between
1333-‐1573
knew
exactly
what
they
were
doing
and
placed
the
rocks
around
the
tree
image.
By
using
a
concept
called
medial-‐axis
transformaNon,
the
scienNsts
showed
that
the
hidden
branched
tree
converges
on
the
main
area
from
which
the
garden
is
viewed.
The
trunk
leads
to
the
prime
viewing
site
in
the
ancient
temple
that
once
overlooked
the
garden.
It
is
thought
that
abstract
art
may
have
a
similar
impact.
"There
is
a
growing
realisaNon
that
scienNfic
analysis
can
reveal
unexpected
structural
features
hidden
in
controversial
abstract
painNngs,"
Van
Tonder
said
7
Adapted
from
“Instance-‐Based
Learning”
lecture
slides
by
Andrew
Moore,
CMU.
k
–
Nearest
Neighbor
n Generalizes
1-‐NN
to
smooth
away
noise
in
the
labels
n A
new
point
is
now
assigned
the
most
frequent
label
of
its
k
nearest
neighbors
Appalling
behavior!
Loses
all
the
detail
that
1-‐nearest
neighbor
would
give.
The
tails
are
horrible!