<s>
These	O
input	O
data	O
used	O
to	O
build	O
the	O
model	O
are	O
usually	O
divided	O
into	O
multiple	O
data	B-General_Concept
sets	I-General_Concept
.	O
</s>
<s>
In	O
particular	O
,	O
three	O
data	B-General_Concept
sets	I-General_Concept
are	O
commonly	O
used	O
in	O
different	O
stages	O
of	O
the	O
creation	O
of	O
the	O
model	O
:	O
training	O
,	O
validation	O
,	O
and	O
test	O
sets	O
.	O
</s>
<s>
The	O
model	O
is	O
initially	O
fit	O
on	O
a	O
training	O
data	B-General_Concept
set	I-General_Concept
,	O
which	O
is	O
a	O
set	O
of	O
examples	O
used	O
to	O
fit	O
the	O
parameters	O
(	O
e.g.	O
</s>
<s>
weights	O
of	O
connections	O
between	O
neurons	O
in	O
artificial	B-Architecture
neural	I-Architecture
networks	I-Architecture
)	O
of	O
the	O
model	O
.	O
</s>
<s>
a	O
naive	B-General_Concept
Bayes	I-General_Concept
classifier	I-General_Concept
)	O
is	O
trained	O
on	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
using	O
a	O
supervised	B-General_Concept
learning	I-General_Concept
method	O
,	O
for	O
example	O
using	O
optimization	O
methods	O
such	O
as	O
gradient	B-Algorithm
descent	I-Algorithm
or	O
stochastic	B-Algorithm
gradient	I-Algorithm
descent	I-Algorithm
.	O
</s>
<s>
In	O
practice	O
,	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
often	O
consists	O
of	O
pairs	O
of	O
an	O
input	O
vector	B-Data_Structure
(	O
or	O
scalar	O
)	O
and	O
the	O
corresponding	O
output	O
vector	B-Data_Structure
(	O
or	O
scalar	O
)	O
,	O
where	O
the	O
answer	O
key	O
is	O
commonly	O
denoted	O
as	O
the	O
target	O
(	O
or	O
label	O
)	O
.	O
</s>
<s>
The	O
current	O
model	O
is	O
run	O
with	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
and	O
produces	O
a	O
result	O
,	O
which	O
is	O
then	O
compared	O
with	O
the	O
target	O
,	O
for	O
each	O
input	O
vector	B-Data_Structure
in	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
The	O
model	O
fitting	O
can	O
include	O
both	O
variable	B-General_Concept
selection	I-General_Concept
and	O
parameter	O
estimation	O
.	O
</s>
<s>
Successively	O
,	O
the	O
fitted	O
model	O
is	O
used	O
to	O
predict	O
the	O
responses	O
for	O
the	O
observations	O
in	O
a	O
second	O
data	B-General_Concept
set	I-General_Concept
called	O
the	O
validation	O
data	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
The	O
validation	O
data	B-General_Concept
set	I-General_Concept
provides	O
an	O
unbiased	O
evaluation	O
of	O
a	O
model	O
fit	O
on	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
while	O
tuning	O
the	O
model	O
's	O
hyperparameters	B-General_Concept
(	O
e.g.	O
</s>
<s>
the	O
number	O
of	O
hidden	O
units	O
—	O
layers	O
and	O
layer	O
widths	O
—	O
in	O
a	O
neural	B-Architecture
network	I-Architecture
)	O
.	O
</s>
<s>
Validation	O
datasets	B-General_Concept
can	O
be	O
used	O
for	O
regularization	O
by	O
early	B-Algorithm
stopping	I-Algorithm
(	O
stopping	O
training	O
when	O
the	O
error	O
on	O
the	O
validation	O
data	B-General_Concept
set	I-General_Concept
increases	O
,	O
as	O
this	O
is	O
a	O
sign	O
of	O
over-fitting	B-Error_Name
to	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
)	O
.	O
</s>
<s>
This	O
simple	O
procedure	O
is	O
complicated	O
in	O
practice	O
by	O
the	O
fact	O
that	O
the	O
validation	O
dataset	B-General_Concept
's	O
error	O
may	O
fluctuate	O
during	O
training	O
,	O
producing	O
multiple	O
local	O
minima	O
.	O
</s>
<s>
This	O
complication	O
has	O
led	O
to	O
the	O
creation	O
of	O
many	O
ad-hoc	O
rules	O
for	O
deciding	O
when	O
over-fitting	B-Error_Name
has	O
truly	O
begun	O
.	O
</s>
<s>
Finally	O
,	O
the	O
test	O
data	B-General_Concept
set	I-General_Concept
is	O
a	O
data	B-General_Concept
set	I-General_Concept
used	O
to	O
provide	O
an	O
unbiased	O
evaluation	O
of	O
a	O
final	O
model	O
fit	O
on	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
If	O
the	O
data	O
in	O
the	O
test	O
data	B-General_Concept
set	I-General_Concept
has	O
never	O
been	O
used	O
in	O
training	O
(	O
for	O
example	O
in	O
cross-validation	B-Application
)	O
,	O
the	O
test	O
data	B-General_Concept
set	I-General_Concept
is	O
also	O
called	O
a	O
holdout	O
data	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
The	O
term	O
"	O
validation	B-General_Concept
set	I-General_Concept
"	O
is	O
sometimes	O
used	O
instead	O
of	O
"	O
test	O
set	O
"	O
in	O
some	O
literature	O
(	O
e.g.	O
,	O
if	O
the	O
original	O
data	B-General_Concept
set	I-General_Concept
was	O
partitioned	O
into	O
only	O
two	O
subsets	O
,	O
the	O
test	O
set	O
might	O
be	O
referred	O
to	O
as	O
the	O
validation	B-General_Concept
set	I-General_Concept
)	O
.	O
</s>
<s>
Deciding	O
the	O
sizes	O
and	O
strategies	O
for	O
data	B-General_Concept
set	I-General_Concept
division	O
in	O
training	O
,	O
test	O
and	O
validation	B-General_Concept
sets	I-General_Concept
is	O
very	O
dependent	O
on	O
the	O
problem	O
and	O
data	O
available	O
.	O
</s>
<s>
A	O
training	O
data	B-General_Concept
set	I-General_Concept
is	O
a	O
data	B-General_Concept
set	I-General_Concept
of	O
examples	O
used	O
during	O
the	O
learning	O
process	O
and	O
is	O
used	O
to	O
fit	O
the	O
parameters	O
(	O
e.g.	O
,	O
weights	O
)	O
of	O
,	O
for	O
example	O
,	O
a	O
classifier	B-General_Concept
.	O
</s>
<s>
For	O
classification	B-General_Concept
tasks	O
,	O
a	O
supervised	B-General_Concept
learning	I-General_Concept
algorithm	O
looks	O
at	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
to	O
determine	O
,	O
or	O
learn	O
,	O
the	O
optimal	O
combinations	O
of	O
variables	O
that	O
will	O
generate	O
a	O
good	O
predictive	B-General_Concept
model	I-General_Concept
.	O
</s>
<s>
The	O
fitted	O
model	O
is	O
evaluated	O
using	O
“	O
new	O
”	O
examples	O
from	O
the	O
held-out	O
datasets	B-General_Concept
(	O
validation	O
and	O
test	O
datasets	B-General_Concept
)	O
to	O
estimate	O
the	O
model	O
’s	O
accuracy	O
in	O
classifying	O
new	O
data	O
.	O
</s>
<s>
To	O
reduce	O
the	O
risk	O
of	O
issues	O
such	O
as	O
over-fitting	B-Error_Name
,	O
the	O
examples	O
in	O
the	O
validation	O
and	O
test	O
datasets	B-General_Concept
should	O
not	O
be	O
used	O
to	O
train	O
the	O
model	O
.	O
</s>
<s>
Most	O
approaches	O
that	O
search	O
through	O
training	O
data	O
for	O
empirical	O
relationships	O
tend	O
to	O
overfit	B-Error_Name
the	O
data	O
,	O
meaning	O
that	O
they	O
can	O
identify	O
and	O
exploit	O
apparent	O
relationships	O
in	O
the	O
training	O
data	O
that	O
do	O
not	O
hold	O
in	O
general	O
.	O
</s>
<s>
A	O
validation	O
data	B-General_Concept
set	I-General_Concept
is	O
a	O
data-set	B-General_Concept
of	O
examples	O
used	O
to	O
tune	O
the	O
hyperparameters	B-General_Concept
(	O
i.e.	O
</s>
<s>
the	O
architecture	O
)	O
of	O
a	O
classifier	B-General_Concept
.	O
</s>
<s>
An	O
example	O
of	O
a	O
hyperparameter	B-General_Concept
for	O
artificial	B-Architecture
neural	I-Architecture
networks	I-Architecture
includes	O
the	O
number	O
of	O
hidden	O
units	O
in	O
each	O
layer	O
.	O
</s>
<s>
It	O
,	O
as	O
well	O
as	O
the	O
testing	O
set	O
(	O
as	O
mentioned	O
below	O
)	O
,	O
should	O
follow	O
the	O
same	O
probability	O
distribution	O
as	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
In	O
order	O
to	O
avoid	O
overfitting	B-Error_Name
,	O
when	O
any	O
classification	B-General_Concept
parameter	O
needs	O
to	O
be	O
adjusted	O
,	O
it	O
is	O
necessary	O
to	O
have	O
a	O
validation	O
data	B-General_Concept
set	I-General_Concept
in	O
addition	O
to	O
the	O
training	O
and	O
test	O
datasets	B-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
if	O
the	O
most	O
suitable	O
classifier	B-General_Concept
for	O
the	O
problem	O
is	O
sought	O
,	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
is	O
used	O
to	O
train	O
the	O
different	O
candidate	O
classifiers	B-General_Concept
,	O
the	O
validation	O
data	B-General_Concept
set	I-General_Concept
is	O
used	O
to	O
compare	O
their	O
performances	O
and	O
decide	O
which	O
one	O
to	O
take	O
and	O
,	O
finally	O
,	O
the	O
test	O
data	B-General_Concept
set	I-General_Concept
is	O
used	O
to	O
obtain	O
the	O
performance	O
characteristics	O
such	O
as	O
accuracy	O
,	O
sensitivity	O
,	O
specificity	O
,	O
F-measure	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
The	O
validation	O
data	B-General_Concept
set	I-General_Concept
functions	O
as	O
a	O
hybrid	O
:	O
it	O
is	O
training	O
data	O
used	O
for	O
testing	O
,	O
but	O
neither	O
as	O
part	O
of	O
the	O
low-level	O
training	O
nor	O
as	O
part	O
of	O
the	O
final	O
testing	O
.	O
</s>
<s>
The	O
basic	O
process	O
of	O
using	O
a	O
validation	O
data	B-General_Concept
set	I-General_Concept
for	O
model	O
selection	O
(	O
as	O
part	O
of	O
training	O
data	B-General_Concept
set	I-General_Concept
,	O
validation	O
data	B-General_Concept
set	I-General_Concept
,	O
and	O
test	O
data	B-General_Concept
set	I-General_Concept
)	O
is	O
:	O
</s>
<s>
An	O
application	O
of	O
this	O
process	O
is	O
in	O
early	B-Algorithm
stopping	I-Algorithm
,	O
where	O
the	O
candidate	O
models	O
are	O
successive	O
iterations	O
of	O
the	O
same	O
network	O
,	O
and	O
training	O
stops	O
when	O
the	O
error	O
on	O
the	O
validation	B-General_Concept
set	I-General_Concept
grows	O
,	O
choosing	O
the	O
previous	O
model	O
(	O
the	O
one	O
with	O
minimum	O
error	O
)	O
.	O
</s>
<s>
A	O
test	O
data	B-General_Concept
set	I-General_Concept
is	O
a	O
data	B-General_Concept
set	I-General_Concept
that	O
is	O
independent	O
of	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
,	O
but	O
that	O
follows	O
the	O
same	O
probability	O
distribution	O
as	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
If	O
a	O
model	O
fit	O
to	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
also	O
fits	O
the	O
test	O
data	B-General_Concept
set	I-General_Concept
well	O
,	O
minimal	O
overfitting	B-Error_Name
has	O
taken	O
place	O
(	O
see	O
figure	O
below	O
)	O
.	O
</s>
<s>
A	O
better	O
fitting	O
of	O
the	O
training	O
data	B-General_Concept
set	I-General_Concept
as	O
opposed	O
to	O
the	O
test	O
data	B-General_Concept
set	I-General_Concept
usually	O
points	O
to	O
over-fitting	B-Error_Name
.	O
</s>
<s>
generalization	O
)	O
of	O
a	O
fully	O
specified	O
classifier	B-General_Concept
.	O
</s>
<s>
In	O
a	O
scenario	O
where	O
both	O
validation	O
and	O
test	O
datasets	B-General_Concept
are	O
used	O
,	O
the	O
test	O
data	B-General_Concept
set	I-General_Concept
is	O
typically	O
used	O
to	O
assess	O
the	O
final	O
model	O
that	O
is	O
selected	O
during	O
the	O
validation	O
process	O
.	O
</s>
<s>
In	O
the	O
case	O
where	O
the	O
original	O
data	B-General_Concept
set	I-General_Concept
is	O
partitioned	O
into	O
two	O
subsets	O
(	O
training	O
and	O
test	O
datasets	B-General_Concept
)	O
,	O
the	O
test	O
data	B-General_Concept
set	I-General_Concept
might	O
assess	O
the	O
model	O
only	O
once	O
(	O
e.g.	O
,	O
in	O
the	O
holdout	O
method	O
)	O
.	O
</s>
<s>
However	O
,	O
when	O
using	O
a	O
method	O
such	O
as	O
cross-validation	B-Application
,	O
two	O
partitions	O
can	O
be	O
sufficient	O
and	O
effective	O
since	O
results	O
are	O
averaged	O
after	O
repeated	O
rounds	O
of	O
model	O
training	O
and	O
testing	O
to	O
help	O
reduce	O
bias	O
and	O
variability	O
.	O
</s>
<s>
With	O
this	O
perspective	O
,	O
the	O
most	O
common	O
use	O
of	O
the	O
terms	O
test	O
set	O
and	O
validation	B-General_Concept
set	I-General_Concept
is	O
the	O
one	O
here	O
described	O
.	O
</s>
<s>
However	O
,	O
in	O
both	O
industry	O
and	O
academia	O
,	O
they	O
are	O
sometimes	O
used	O
interchanged	O
,	O
by	O
considering	O
that	O
the	O
internal	O
process	O
is	O
testing	O
different	O
models	O
to	O
improve	O
(	O
test	O
set	O
as	O
a	O
development	O
set	O
)	O
and	O
the	O
final	O
model	O
is	O
the	O
one	O
that	O
needs	O
to	O
be	O
validated	O
before	O
real	O
use	O
with	O
an	O
unseen	O
data	O
(	O
validation	B-General_Concept
set	I-General_Concept
)	O
.	O
</s>
<s>
In	O
order	O
to	O
get	O
more	O
stable	O
results	O
and	O
use	O
all	O
valuable	O
data	O
for	O
training	O
,	O
a	O
data	B-General_Concept
set	I-General_Concept
can	O
be	O
repeatedly	O
split	O
into	O
several	O
training	O
and	O
a	O
validation	O
datasets	B-General_Concept
.	O
</s>
<s>
This	O
is	O
known	O
as	O
cross-validation	B-Application
.	O
</s>
<s>
To	O
confirm	O
the	O
model	O
's	O
performance	O
,	O
an	O
additional	O
test	O
data	B-General_Concept
set	I-General_Concept
held	O
out	O
from	O
cross-validation	B-Application
is	O
normally	O
used	O
.	O
</s>
