<s>
In	O
statistics	O
,	O
the	O
phi	B-General_Concept
coefficient	I-General_Concept
(	O
or	O
mean	B-General_Concept
square	I-General_Concept
contingency	I-General_Concept
coefficient	I-General_Concept
and	O
denoted	O
by	O
φ	O
or	O
rφ	O
)	O
is	O
a	O
measure	O
of	O
association	O
for	O
two	O
binary	O
variables	O
.	O
</s>
<s>
In	O
machine	O
learning	O
,	O
it	O
is	O
known	O
as	O
the	O
Matthews	B-General_Concept
correlation	I-General_Concept
coefficient	I-General_Concept
(	O
MCC	O
)	O
and	O
used	O
as	O
a	O
measure	O
of	O
the	O
quality	O
of	O
binary	O
(	O
two-class	O
)	O
classifications	B-General_Concept
,	O
introduced	O
by	O
biochemist	O
Brian	O
W	O
.	O
Matthews	O
in	O
1975	O
.	O
</s>
<s>
Introduced	O
by	O
Karl	O
Pearson	O
,	O
and	O
also	O
known	O
as	O
the	O
Yule	O
phi	B-General_Concept
coefficient	I-General_Concept
from	O
its	O
introduction	O
by	O
Udny	O
Yule	O
in	O
1912	O
this	O
measure	O
is	O
similar	O
to	O
the	O
Pearson	O
correlation	O
coefficient	O
in	O
its	O
interpretation	O
.	O
</s>
<s>
In	O
fact	O
,	O
a	O
Pearson	O
correlation	O
coefficient	O
estimated	O
for	O
two	O
binary	O
variables	O
will	O
return	O
the	O
phi	B-General_Concept
coefficient	I-General_Concept
.	O
</s>
<s>
Although	O
computationally	O
the	O
Pearson	O
correlation	O
coefficient	O
reduces	O
to	O
the	O
phi	B-General_Concept
coefficient	I-General_Concept
in	O
the	O
2×2	O
case	O
,	O
they	O
are	O
not	O
in	O
general	O
the	O
same	O
.	O
</s>
<s>
The	O
phi	B-General_Concept
coefficient	I-General_Concept
has	O
a	O
maximum	O
value	O
that	O
is	O
determined	O
by	O
the	O
distribution	O
of	O
the	O
two	O
variables	O
if	O
one	O
or	O
both	O
variables	O
can	O
take	O
on	O
more	O
than	O
two	O
values	O
.	O
</s>
<s>
The	O
MCC	O
is	O
defined	O
identically	O
to	O
phi	B-General_Concept
coefficient	I-General_Concept
,	O
introduced	O
by	O
Karl	O
Pearson	O
,	O
also	O
known	O
as	O
the	O
Yule	O
phi	B-General_Concept
coefficient	I-General_Concept
from	O
its	O
introduction	O
by	O
Udny	O
Yule	O
in	O
1912	O
.	O
</s>
<s>
The	O
MCC	O
is	O
in	O
essence	O
a	O
correlation	O
coefficient	O
between	O
the	O
observed	O
and	O
predicted	O
binary	B-General_Concept
classifications	I-General_Concept
;	O
it	O
returns	O
a	O
value	O
between	O
−1	O
and	O
+1	O
.	O
</s>
<s>
While	O
there	O
is	O
no	O
perfect	O
way	O
of	O
describing	O
the	O
confusion	B-General_Concept
matrix	I-General_Concept
of	O
true	O
and	O
false	O
positives	O
and	O
negatives	O
by	O
a	O
single	O
number	O
,	O
the	O
Matthews	B-General_Concept
correlation	I-General_Concept
coefficient	I-General_Concept
is	O
generally	O
regarded	O
as	O
being	O
one	O
of	O
the	O
best	O
such	O
measures	O
.	O
</s>
<s>
The	O
MCC	O
can	O
be	O
calculated	O
directly	O
from	O
the	O
confusion	B-General_Concept
matrix	I-General_Concept
using	O
the	O
formula	O
:	O
</s>
<s>
If	O
any	O
of	O
the	O
four	O
sums	O
in	O
the	O
denominator	O
is	O
zero	O
,	O
the	O
denominator	O
can	O
be	O
arbitrarily	O
set	O
to	O
one	O
;	O
this	O
results	O
in	O
a	O
Matthews	B-General_Concept
correlation	I-General_Concept
coefficient	I-General_Concept
of	O
zero	O
,	O
which	O
can	O
be	O
shown	O
to	O
be	O
the	O
correct	O
limiting	O
value	O
.	O
</s>
<s>
As	O
a	O
correlation	O
coefficient	O
,	O
the	O
Matthews	B-General_Concept
correlation	I-General_Concept
coefficient	I-General_Concept
is	O
the	O
geometric	O
mean	O
of	O
the	O
regression	B-General_Concept
coefficients	I-General_Concept
of	O
the	O
problem	O
and	O
its	O
dual	O
.	O
</s>
<s>
The	O
component	O
regression	B-General_Concept
coefficients	I-General_Concept
of	O
the	O
Matthews	B-General_Concept
correlation	I-General_Concept
coefficient	I-General_Concept
are	O
Markedness	O
( Δp	O
)	O
and	O
Youden	B-General_Concept
's	I-General_Concept
J	I-General_Concept
statistic	I-General_Concept
(	O
Informedness	B-General_Concept
or	O
Δp	O
 '	O
)	O
.	O
</s>
<s>
Markedness	O
and	O
Informedness	B-General_Concept
correspond	O
to	O
different	O
directions	O
of	O
information	O
flow	O
and	O
generalize	O
Youden	B-General_Concept
's	I-General_Concept
J	I-General_Concept
statistic	I-General_Concept
,	O
the	O
p	O
statistics	O
and	O
(	O
as	O
their	O
geometric	O
mean	O
)	O
the	O
Matthews	B-General_Concept
Correlation	I-General_Concept
Coefficient	I-General_Concept
to	O
more	O
than	O
two	O
classes	O
.	O
</s>
<s>
Some	O
scientists	O
claim	O
the	O
Matthews	B-General_Concept
correlation	I-General_Concept
coefficient	I-General_Concept
to	O
be	O
the	O
most	O
informative	O
single	O
score	O
to	O
establish	O
the	O
quality	O
of	O
a	O
binary	B-General_Concept
classifier	I-General_Concept
prediction	O
in	O
a	O
confusion	B-General_Concept
matrix	I-General_Concept
context	O
.	O
</s>
<s>
With	O
these	O
two	O
labelled	O
sets	O
(	O
actual	O
and	O
predictions	O
)	O
we	O
can	O
create	O
a	O
confusion	B-General_Concept
matrix	I-General_Concept
that	O
will	O
summarize	O
the	O
results	O
of	O
testing	O
the	O
classifier	O
:	O
</s>
<s>
In	O
this	O
confusion	B-General_Concept
matrix	I-General_Concept
,	O
of	O
the	O
8	O
cat	O
pictures	O
,	O
the	O
system	O
judged	O
that	O
2	O
were	O
dogs	O
,	O
and	O
of	O
the	O
4	O
dog	O
pictures	O
,	O
it	O
predicted	O
that	O
1	O
was	O
a	O
cat	O
.	O
</s>
<s>
In	O
abstract	O
terms	O
,	O
the	O
confusion	B-General_Concept
matrix	I-General_Concept
is	O
as	O
follows	O
:	O
</s>
<s>
The	O
four	O
outcomes	O
can	O
be	O
formulated	O
in	O
a	O
2×2	O
contingency	B-Application
table	I-Application
or	O
confusion	B-General_Concept
matrix	I-General_Concept
,	O
as	O
follows	O
:	O
</s>
<s>
The	O
Matthews	B-General_Concept
correlation	I-General_Concept
coefficient	I-General_Concept
has	O
been	O
generalized	O
to	O
the	O
multiclass	O
case	O
.	O
</s>
<s>
Using	O
above	O
formula	O
to	O
compute	O
MCC	O
measure	O
for	O
the	O
dog	O
and	O
cat	O
example	O
discussed	O
above	O
,	O
where	O
the	O
confusion	B-General_Concept
matrix	I-General_Concept
is	O
treated	O
as	O
a	O
2	O
×	O
Multiclass	O
example	O
:	O
</s>
<s>
As	O
explained	O
by	O
Davide	O
Chicco	O
in	O
his	O
paper	O
"	O
Ten	O
quick	O
tips	O
for	O
machine	O
learning	O
in	O
computational	O
biology	O
"	O
(	O
BioData	O
Mining	O
,	O
2017	O
)	O
and	O
"	O
The	O
advantages	O
of	O
the	O
Matthews	B-General_Concept
correlation	I-General_Concept
coefficient	I-General_Concept
(	O
MCC	O
)	O
over	O
F1	B-General_Concept
score	I-General_Concept
and	O
accuracy	O
in	O
binary	B-General_Concept
classification	I-General_Concept
evaluation	O
"	O
(	O
BMC	O
Genomics	O
,	O
2020	O
)	O
,	O
the	O
Matthews	B-General_Concept
correlation	I-General_Concept
coefficient	I-General_Concept
is	O
more	O
informative	O
than	O
F1	B-General_Concept
score	I-General_Concept
and	O
accuracy	O
in	O
evaluating	O
binary	B-General_Concept
classification	I-General_Concept
problems	O
,	O
because	O
it	O
takes	O
into	O
account	O
the	O
balance	O
ratios	O
of	O
the	O
four	O
confusion	B-General_Concept
matrix	I-General_Concept
categories	O
(	O
true	O
positives	O
,	O
true	O
negatives	O
,	O
false	O
positives	O
,	O
false	O
negatives	O
)	O
.	O
</s>
<s>
Note	O
that	O
the	O
F1	B-General_Concept
score	I-General_Concept
depends	O
on	O
which	O
class	O
is	O
defined	O
as	O
the	O
positive	O
class	O
.	O
</s>
<s>
In	O
the	O
first	O
example	O
above	O
,	O
the	O
F1	B-General_Concept
score	I-General_Concept
is	O
high	O
because	O
the	O
majority	O
class	O
is	O
defined	O
as	O
the	O
positive	O
class	O
.	O
</s>
<s>
Inverting	O
the	O
positive	O
and	O
negative	O
classes	O
results	O
in	O
the	O
following	O
confusion	B-General_Concept
matrix	I-General_Concept
:	O
</s>
<s>
This	O
gives	O
an	O
F1	B-General_Concept
score	I-General_Concept
=	O
0%	O
.	O
</s>
<s>
The	O
MCC	O
does	O
n't	O
depend	O
on	O
which	O
class	O
is	O
the	O
positive	O
one	O
,	O
which	O
has	O
the	O
advantage	O
over	O
the	O
F1	B-General_Concept
score	I-General_Concept
to	O
avoid	O
incorrectly	O
defining	O
the	O
positive	O
class	O
.	O
</s>
