<s>
UPGMA	B-Algorithm
(	O
unweighted	B-Algorithm
pair	I-Algorithm
group	I-Algorithm
method	I-Algorithm
with	I-Algorithm
arithmetic	I-Algorithm
mean	I-Algorithm
)	O
is	O
a	O
simple	O
agglomerative	O
(	O
bottom-up	O
)	O
hierarchical	B-Algorithm
clustering	I-Algorithm
method	O
.	O
</s>
<s>
It	O
also	O
has	O
a	O
weighted	O
variant	O
,	O
WPGMA	B-Algorithm
,	O
and	O
they	O
are	O
generally	O
attributed	O
to	O
Sokal	O
and	O
Michener	O
.	O
</s>
<s>
Thus	O
the	O
simple	O
averaging	O
in	O
WPGMA	B-Algorithm
produces	O
a	O
weighted	O
result	O
and	O
the	O
proportional	O
averaging	O
in	O
UPGMA	B-Algorithm
produces	O
an	O
unweighted	O
result	O
(	O
see	O
the	O
working	O
example	O
)	O
.	O
</s>
<s>
The	O
UPGMA	B-Algorithm
algorithm	O
constructs	O
a	O
rooted	O
tree	O
(	O
dendrogram	B-Application
)	O
that	O
reflects	O
the	O
structure	O
present	O
in	O
a	O
pairwise	O
similarity	O
matrix	O
(	O
or	O
a	O
dissimilarity	O
matrix	O
)	O
.	O
</s>
<s>
The	O
distance	O
between	O
any	O
two	O
clusters	O
and	O
,	O
each	O
of	O
size	O
(	O
i.e.	O
,	O
cardinality	B-Application
)	O
and	O
,	O
is	O
taken	O
to	O
be	O
the	O
average	O
of	O
all	O
distances	O
between	O
pairs	O
of	O
objects	O
in	O
and	O
in	O
,	O
that	O
is	O
,	O
the	O
mean	O
distance	O
between	O
elements	O
of	O
each	O
cluster	O
:	O
</s>
<s>
The	O
UPGMA	B-Algorithm
algorithm	O
produces	O
rooted	O
dendrograms	B-Application
and	O
requires	O
a	O
constant-rate	O
assumption	O
-	O
that	O
is	O
,	O
it	O
assumes	O
an	O
ultrametric	B-Algorithm
tree	O
in	O
which	O
the	O
distances	O
from	O
the	O
root	O
to	O
every	O
branch	O
tip	O
are	O
equal	O
.	O
</s>
<s>
When	O
the	O
tips	O
are	O
molecular	O
data	O
(	O
i.e.	O
,	O
DNA	O
,	O
RNA	O
and	O
protein	O
)	O
sampled	O
at	O
the	O
same	O
time	O
,	O
the	O
ultrametricity	B-Algorithm
assumption	O
becomes	O
equivalent	O
to	O
assuming	O
a	O
molecular	O
clock	O
.	O
</s>
<s>
This	O
working	O
example	O
is	O
based	O
on	O
a	O
JC69	O
genetic	O
distance	O
matrix	O
computed	O
from	O
the	O
5S	O
ribosomal	O
RNA	O
sequence	B-Algorithm
alignment	I-Algorithm
of	O
five	O
bacteria	O
:	O
Bacillus	O
subtilis	O
(	O
)	O
,	O
Bacillus	O
stearothermophilus	O
(	O
)	O
,	O
Lactobacillus	O
viridescens	O
(	O
)	O
,	O
Acholeplasma	O
modicum	O
(	O
)	O
,	O
and	O
Micrococcus	O
luteus	O
(	O
)	O
.	O
</s>
<s>
This	O
corresponds	O
to	O
the	O
expectation	O
of	O
the	O
ultrametricity	B-Algorithm
hypothesis	O
.	O
</s>
<s>
Because	O
of	O
the	O
ultrametricity	B-Algorithm
constraint	O
,	O
the	O
branches	O
joining	O
or	O
to	O
,	O
and	O
to	O
are	O
equal	O
and	O
have	O
the	O
following	O
length	O
:	O
</s>
<s>
The	O
dendrogram	B-Application
is	O
now	O
complete	O
.	O
</s>
<s>
It	O
is	O
ultrametric	B-Algorithm
because	O
all	O
tips	O
(	O
to	O
)	O
are	O
equidistant	O
from	O
:	O
</s>
<s>
The	O
dendrogram	B-Application
is	O
therefore	O
rooted	O
by	O
,	O
its	O
deepest	O
node	O
.	O
</s>
<s>
Alternative	O
linkage	O
schemes	O
include	O
single	B-Algorithm
linkage	I-Algorithm
clustering	I-Algorithm
,	O
complete	B-Algorithm
linkage	I-Algorithm
clustering	I-Algorithm
,	O
and	O
WPGMA	B-Algorithm
average	I-Algorithm
linkage	I-Algorithm
clustering	I-Algorithm
.	O
</s>
<s>
Complete	B-Algorithm
linkage	I-Algorithm
clustering	I-Algorithm
avoids	O
a	O
drawback	O
of	O
the	O
alternative	O
single	B-Algorithm
linkage	I-Algorithm
clustering	I-Algorithm
method	O
-	O
the	O
so-called	O
chaining	O
phenomenon	O
,	O
where	O
clusters	O
formed	O
via	O
single	B-Algorithm
linkage	I-Algorithm
clustering	I-Algorithm
may	O
be	O
forced	O
together	O
due	O
to	O
single	O
elements	O
being	O
close	O
to	O
each	O
other	O
,	O
even	O
though	O
many	O
of	O
the	O
elements	O
in	O
each	O
cluster	O
may	O
be	O
very	O
distant	O
to	O
each	O
other	O
.	O
</s>
<s>
+	O
Comparison	O
of	O
dendrograms	B-Application
obtained	O
under	O
different	O
clustering	O
methods	O
from	O
the	O
same	O
distance	O
matrix	O
.	O
</s>
<s>
Average	O
linkage	O
clustering	O
:	O
UPGMA	B-Algorithm
.	O
</s>
<s>
In	O
bioinformatics	O
,	O
UPGMA	B-Algorithm
is	O
used	O
for	O
the	O
creation	O
of	O
phenetic	O
trees	O
(	O
phenograms	O
)	O
.	O
</s>
<s>
UPGMA	B-Algorithm
was	O
initially	O
designed	O
for	O
use	O
in	O
protein	O
electrophoresis	O
studies	O
,	O
but	O
is	O
currently	O
most	O
often	O
used	O
to	O
produce	O
guide	O
trees	O
for	O
more	O
sophisticated	O
algorithms	O
.	O
</s>
<s>
This	O
algorithm	O
is	O
for	O
example	O
used	O
in	O
sequence	B-Algorithm
alignment	I-Algorithm
procedures	O
,	O
as	O
it	O
proposes	O
one	O
order	O
in	O
which	O
the	O
sequences	O
will	O
be	O
aligned	O
.	O
</s>
<s>
In	O
phylogenetics	O
,	O
UPGMA	B-Algorithm
assumes	O
a	O
constant	O
rate	O
of	O
evolution	O
(	O
molecular	O
clock	O
hypothesis	O
)	O
and	O
that	O
all	O
sequences	O
were	O
sampled	O
at	O
the	O
same	O
time	O
,	O
and	O
is	O
not	O
a	O
well-regarded	O
method	O
for	O
inferring	O
relationships	O
unless	O
this	O
assumption	O
has	O
been	O
tested	O
and	O
justified	O
for	O
the	O
data	O
set	O
being	O
used	O
.	O
</s>
<s>
Notice	O
that	O
even	O
under	O
a	O
'	O
strict	O
clock	O
 '	O
,	O
sequences	O
sampled	O
at	O
different	O
times	O
should	O
not	O
lead	O
to	O
an	O
ultrametric	B-Algorithm
tree	O
.	O
</s>
<s>
A	O
trivial	O
implementation	O
of	O
the	O
algorithm	O
to	O
construct	O
the	O
UPGMA	B-Algorithm
tree	O
has	O
time	O
complexity	O
,	O
and	O
using	O
a	O
heap	O
for	O
each	O
cluster	O
to	O
keep	O
its	O
distances	O
from	O
other	O
cluster	O
reduces	O
its	O
time	O
to	O
.	O
</s>
