<s>
Similarity	B-General_Concept
learning	I-General_Concept
is	O
an	O
area	O
of	O
supervised	B-General_Concept
machine	I-General_Concept
learning	I-General_Concept
in	O
artificial	B-Application
intelligence	I-Application
.	I-Application
</s>
<s>
It	O
is	O
closely	O
related	O
to	O
regression	O
and	O
classification	B-General_Concept
,	O
but	O
the	O
goal	O
is	O
to	O
learn	O
a	O
similarity	O
function	O
that	O
measures	O
how	O
similar	O
or	O
related	O
two	O
objects	O
are	O
.	O
</s>
<s>
It	O
has	O
applications	O
in	O
ranking	O
,	O
in	O
recommendation	B-Application
systems	I-Application
,	O
visual	O
identity	O
tracking	O
,	O
face	O
verification	O
,	O
and	O
speaker	O
verification	O
.	O
</s>
<s>
The	O
goal	O
is	O
again	O
to	O
learn	O
a	O
classifier	B-General_Concept
that	O
can	O
decide	O
if	O
a	O
new	O
pair	O
of	O
objects	O
is	O
similar	O
or	O
not	O
.	O
</s>
<s>
The	O
goal	O
is	O
to	O
learn	O
a	O
function	O
such	O
that	O
for	O
any	O
new	O
triplet	O
of	O
objects	O
,	O
it	O
obeys	O
(	O
contrastive	B-General_Concept
learning	I-General_Concept
)	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
ranking-based	O
similarity	B-General_Concept
learning	I-General_Concept
is	O
easier	O
to	O
apply	O
in	O
real	O
large-scale	O
applications	O
.	O
</s>
<s>
Hashes	B-Error_Name
input	O
items	O
so	O
that	O
similar	O
items	O
map	O
to	O
the	O
same	O
"	O
buckets	O
"	O
in	O
memory	O
with	O
high	O
probability	O
(	O
the	O
number	O
of	O
buckets	O
being	O
much	O
smaller	O
than	O
the	O
universe	O
of	O
possible	O
input	O
items	O
)	O
.	O
</s>
<s>
It	O
is	O
often	O
applied	O
in	O
nearest	B-Algorithm
neighbor	I-Algorithm
search	I-Algorithm
on	O
large-scale	O
high-dimensional	O
data	O
,	O
e.g.	O
,	O
image	O
databases	O
,	O
document	O
collections	O
,	O
time-series	O
databases	O
,	O
and	O
genome	O
databases	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
the	O
case	O
of	O
ranking	O
similarity	B-General_Concept
learning	I-General_Concept
,	O
one	O
aims	O
to	O
learn	O
a	O
matrix	O
W	O
that	O
parametrizes	O
the	O
similarity	O
function	O
.	O
</s>
<s>
When	O
data	O
is	O
abundant	O
,	O
a	O
common	O
approach	O
is	O
to	O
learn	O
a	O
siamese	B-Algorithm
network	I-Algorithm
-	O
A	O
deep	O
network	O
model	O
with	O
parameter	O
sharing	O
.	O
</s>
<s>
Similarity	B-General_Concept
learning	I-General_Concept
is	O
closely	O
related	O
to	O
distance	O
metric	O
learning	O
.	O
</s>
<s>
The	O
distance	O
corresponds	O
to	O
the	O
Euclidean	O
distance	O
between	O
the	O
transformed	O
feature	B-Algorithm
vectors	I-Algorithm
and	O
.	O
</s>
<s>
Some	O
well-known	O
approaches	O
for	O
metric	O
learning	O
include	O
Learning	O
from	O
relative	O
comparisons	O
which	O
is	O
based	O
on	O
the	O
Triplet	B-Algorithm
loss	I-Algorithm
,	O
Large	B-Algorithm
margin	I-Algorithm
nearest	I-Algorithm
neighbor	I-Algorithm
,	O
Information	O
theoretic	O
metric	O
learning	O
(	O
ITML	O
)	O
.	O
</s>
<s>
Similarity	B-General_Concept
learning	I-General_Concept
is	O
used	O
in	O
information	O
retrieval	O
for	O
learning	O
to	O
rank	O
,	O
in	O
face	O
verification	O
or	O
face	O
identification	O
,	O
and	O
in	O
recommendation	B-Application
systems	I-Application
.	O
</s>
<s>
This	O
includes	O
unsupervised	B-General_Concept
learning	I-General_Concept
such	O
as	O
clustering	B-Algorithm
,	O
which	O
groups	O
together	O
close	O
or	O
similar	O
objects	O
.	O
</s>
<s>
It	O
also	O
includes	O
supervised	O
approaches	O
like	O
K-nearest	B-General_Concept
neighbor	I-General_Concept
algorithm	I-General_Concept
which	O
rely	O
on	O
labels	O
of	O
nearby	O
objects	O
to	O
decide	O
on	O
the	O
label	O
of	O
a	O
new	O
object	O
.	O
</s>
<s>
Metric	O
and	O
similarity	B-General_Concept
learning	I-General_Concept
naively	O
scale	O
quadratically	O
with	O
the	O
dimension	O
of	O
the	O
input	O
space	O
,	O
as	O
can	O
easily	O
see	O
when	O
the	O
learned	O
metric	O
has	O
a	O
bilinear	O
form	O
.	O
</s>
<s>
is	O
a	O
free	B-Application
software	I-Application
Python	B-Language
library	O
which	O
offers	O
efficient	O
implementations	O
of	O
several	O
supervised	O
and	O
weakly-supervised	O
similarity	O
and	O
metric	O
learning	O
algorithms	O
.	O
</s>
<s>
The	O
API	O
of	O
metric-learn	O
is	O
compatible	O
with	O
scikit-learn	B-Application
.	O
</s>
<s>
is	O
a	O
Python	B-Language
framework	O
to	O
train	O
and	O
validate	O
the	O
models	O
producing	O
high-quality	O
embeddings	O
.	O
</s>
