<s>
Medoids	B-Algorithm
are	O
representative	O
objects	O
of	O
a	O
data	B-General_Concept
set	I-General_Concept
or	O
a	O
cluster	B-Algorithm
within	O
a	O
data	B-General_Concept
set	I-General_Concept
whose	O
sum	O
of	O
dissimilarities	O
to	O
all	O
the	O
objects	O
in	O
the	O
cluster	B-Algorithm
is	O
minimal	O
.	O
</s>
<s>
Medoids	B-Algorithm
are	O
similar	O
in	O
concept	O
to	O
means	O
or	O
centroids	O
,	O
but	O
medoids	B-Algorithm
are	O
always	O
restricted	O
to	O
be	O
members	O
of	O
the	O
data	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
Medoids	B-Algorithm
are	O
most	O
commonly	O
used	O
on	O
data	O
when	O
a	O
mean	O
or	O
centroid	O
cannot	O
be	O
defined	O
,	O
such	O
as	O
graphs	O
.	O
</s>
<s>
They	O
are	O
also	O
used	O
in	O
contexts	O
where	O
the	O
centroid	O
is	O
not	O
representative	O
of	O
the	O
dataset	B-General_Concept
like	O
in	O
images	O
,	O
3-D	O
trajectories	O
and	O
gene	O
expression	O
(	O
where	O
while	O
the	O
data	O
is	O
sparse	O
the	O
medoid	B-Algorithm
need	O
not	O
be	O
)	O
.	O
</s>
<s>
For	O
some	O
data	B-General_Concept
sets	I-General_Concept
there	O
may	O
be	O
more	O
than	O
one	O
medoid	B-Algorithm
,	O
as	O
with	O
medians	O
.	O
</s>
<s>
A	O
common	O
application	O
of	O
the	O
medoid	B-Algorithm
is	O
the	O
k-medoids	B-Algorithm
clustering	I-Algorithm
algorithm	O
,	O
which	O
is	O
similar	O
to	O
the	O
k-means	B-Algorithm
algorithm	I-Algorithm
but	O
works	O
when	O
a	O
mean	O
or	O
centroid	O
is	O
not	O
definable	O
.	O
</s>
<s>
First	O
,	O
a	O
set	O
of	O
medoids	B-Algorithm
is	O
chosen	O
at	O
random	O
.	O
</s>
<s>
Third	O
,	O
data	O
are	O
clustered	O
according	O
to	O
the	O
medoid	B-Algorithm
they	O
are	O
most	O
similar	O
to	O
.	O
</s>
<s>
Fourth	O
,	O
the	O
medoid	B-Algorithm
set	O
is	O
optimized	O
via	O
an	O
iterative	O
process	O
.	O
</s>
<s>
Note	O
that	O
a	O
medoid	B-Algorithm
is	O
not	O
equivalent	O
to	O
a	O
median	O
,	O
a	O
geometric	B-General_Concept
median	I-General_Concept
,	O
or	O
centroid	O
.	O
</s>
<s>
A	O
geometric	B-General_Concept
median	I-General_Concept
is	O
defined	O
in	O
any	O
dimension	O
,	O
but	O
is	O
not	O
necessarily	O
a	O
point	O
from	O
within	O
the	O
original	O
dataset	B-General_Concept
.	O
</s>
<s>
Medoids	B-Algorithm
are	O
a	O
popular	O
replacement	O
for	O
the	O
cluster	B-Algorithm
mean	O
when	O
the	O
distance	O
function	O
is	O
not	O
(	O
squared	O
)	O
Euclidean	O
distance	O
,	O
or	O
not	O
even	O
a	O
metric	O
(	O
as	O
the	O
medoid	B-Algorithm
does	O
not	O
require	O
the	O
triangle	O
inequality	O
)	O
.	O
</s>
<s>
When	O
partitioning	O
the	O
data	B-General_Concept
set	I-General_Concept
into	O
clusters	O
,	O
the	O
medoid	B-Algorithm
of	O
each	O
cluster	B-Algorithm
can	O
be	O
used	O
as	O
a	O
representative	O
of	O
each	O
cluster	B-Algorithm
.	O
</s>
<s>
Clustering	B-Algorithm
algorithms	I-Algorithm
based	O
on	O
the	O
idea	O
of	O
medoids	B-Algorithm
include	O
:	O
</s>
<s>
From	O
the	O
definition	O
above	O
,	O
it	O
is	O
clear	O
that	O
the	O
medoid	B-Algorithm
of	O
a	O
set	O
can	O
be	O
computed	O
after	O
computing	O
all	O
pairwise	O
distances	O
between	O
points	O
in	O
the	O
ensemble	O
.	O
</s>
<s>
In	O
the	O
worst	O
case	O
,	O
one	O
can	O
not	O
compute	O
the	O
medoid	B-Algorithm
with	O
fewer	O
distance	O
evaluations.	O
<	O
ref	O
name	O
=	O
"	O
:1	O
"	O
>Newling	O
,	O
James	O
;	O
&	O
Fleuret	O
,	O
François	O
(	O
2016	O
)	O
;	O
"	O
A	O
sub-quadratic	O
exact	O
medoid	B-Algorithm
algorithm	O
"	O
,	O
in	O
Proceedings	O
of	O
the	O
20th	O
International	O
Conference	O
on	O
Artificial	O
Intelligence	O
and	O
Statistics	O
,	O
PMLR	O
54:185-193	O
,	O
2017	O
.	O
<	O
/ref	O
>Bagaria	O
,	O
Vivek	O
;	O
Kamath	O
,	O
Govinda	O
M.	O
;	O
Ntranos	O
,	O
Vasilis	O
;	O
Zhang	O
,	O
Martin	O
J.	O
;	O
&	O
Tse	O
,	O
David	O
N	O
.	O
(	O
2017	O
)	O
;	O
"	O
Medoids	B-Algorithm
in	O
almost	O
linear	O
time	O
via	O
multi-armed	O
bandits	O
"	O
,	O
arXiv	O
preprint	O
Available	O
online	O
.	O
</s>
<s>
However	O
,	O
there	O
are	O
many	O
approaches	O
that	O
allow	O
us	O
to	O
compute	O
medoids	B-Algorithm
either	O
exactly	O
or	O
approximately	O
in	O
sub-quadratic	O
time	O
under	O
different	O
statistical	O
models	O
.	O
</s>
<s>
If	O
the	O
points	O
lie	O
on	O
the	O
real	O
line	O
,	O
computing	O
the	O
medoid	B-Algorithm
reduces	O
to	O
computing	O
the	O
median	O
which	O
can	O
be	O
done	O
in	O
by	O
Quick-select	O
algorithm	O
of	O
Hoare.Hoare	O
,	O
Charles	O
Antony	O
Richard	O
(	O
1961	O
)	O
;	O
"	O
Algorithm	O
65	O
:	O
find	O
"	O
,	O
in	O
Communications	O
of	O
the	O
ACM	O
,	O
4(7 )	O
,	O
321-322	O
However	O
,	O
in	O
higher	O
dimensional	O
real	O
spaces	O
,	O
no	O
linear-time	O
algorithm	O
is	O
known	O
.	O
</s>
<s>
distance	O
computations	O
to	O
approximate	O
the	O
medoid	B-Algorithm
within	O
a	O
factor	O
of	O
with	O
high	O
probability	O
,	O
</s>
