<s>
Out-of-bag	O
(	O
OOB	O
)	O
error	O
,	O
also	O
called	O
out-of-bag	B-Algorithm
estimate	I-Algorithm
,	O
is	O
a	O
method	O
of	O
measuring	O
the	O
prediction	B-General_Concept
error	I-General_Concept
of	O
random	B-Algorithm
forests	I-Algorithm
,	O
boosted	B-Algorithm
decision	I-Algorithm
trees	I-Algorithm
,	O
and	O
other	O
machine	O
learning	O
models	O
utilizing	O
bootstrap	B-Algorithm
aggregating	I-Algorithm
(	O
bagging	B-Algorithm
)	O
.	O
</s>
<s>
Bagging	B-Algorithm
uses	O
subsampling	O
with	O
replacement	O
to	O
create	O
training	O
samples	O
for	O
the	O
model	O
to	O
learn	O
from	O
.	O
</s>
<s>
OOB	O
error	O
is	O
the	O
mean	O
prediction	B-General_Concept
error	I-General_Concept
on	O
each	O
training	O
sample	O
,	O
using	O
only	O
the	O
trees	O
that	O
did	O
not	O
have	O
in	O
their	O
bootstrap	B-Application
sample	I-Application
.	O
</s>
<s>
Bootstrap	B-Algorithm
aggregating	I-Algorithm
allows	O
one	O
to	O
define	O
an	O
out-of-bag	B-Algorithm
estimate	I-Algorithm
of	O
the	O
prediction	O
performance	O
improvement	O
by	O
evaluating	O
predictions	O
on	O
those	O
observations	O
that	O
were	O
not	O
used	O
in	O
the	O
building	O
of	O
the	O
next	O
base	O
learner	O
.	O
</s>
<s>
When	O
bootstrap	B-Algorithm
aggregating	I-Algorithm
is	O
performed	O
,	O
two	O
independent	O
sets	O
are	O
created	O
.	O
</s>
<s>
One	O
set	O
,	O
the	B-Application
bootstrap	I-Application
sample	O
,	O
is	O
the	O
data	O
chosen	O
to	O
be	O
"	O
in-the-bag	O
"	O
by	O
sampling	O
with	O
replacement	O
.	O
</s>
<s>
When	O
this	O
process	O
is	O
repeated	O
,	O
such	O
as	O
when	O
building	O
a	O
random	B-Algorithm
forest	I-Algorithm
,	O
many	O
bootstrap	B-Application
samples	I-Application
and	O
OOB	O
sets	O
are	O
created	O
.	O
</s>
<s>
The	O
OOB	O
sets	O
can	O
be	O
aggregated	O
into	O
one	O
dataset	O
,	O
but	O
each	O
sample	O
is	O
only	O
considered	O
out-of-bag	O
for	O
the	O
trees	O
that	O
do	O
not	O
include	O
it	O
in	O
their	O
bootstrap	B-Application
sample	I-Application
.	O
</s>
<s>
This	O
example	O
shows	O
how	O
bagging	B-Algorithm
could	O
be	O
used	O
in	O
the	O
context	O
of	O
diagnosing	O
disease	O
.	O
</s>
<s>
Find	O
all	O
models	O
(	O
or	O
trees	O
,	O
in	O
the	O
case	O
of	O
a	O
random	B-Algorithm
forest	I-Algorithm
)	O
that	O
are	O
not	O
trained	O
by	O
the	O
OOB	O
instance	O
.	O
</s>
<s>
The	O
bagging	B-Algorithm
process	O
can	O
be	O
customized	O
to	O
fit	O
the	O
needs	O
of	O
a	O
model	O
.	O
</s>
<s>
To	O
ensure	O
an	O
accurate	O
model	O
,	O
the	B-Application
bootstrap	I-Application
training	O
sample	O
size	O
should	O
be	O
close	O
to	O
that	O
of	O
the	O
original	O
set	O
.	O
</s>
<s>
Out-of-bag	B-Algorithm
error	I-Algorithm
and	O
cross-validation	B-Application
(	O
CV	O
)	O
are	O
different	O
methods	O
of	O
measuring	O
the	O
error	O
estimate	O
of	O
a	O
machine	O
learning	O
model	O
.	O
</s>
<s>
That	O
is	O
,	O
once	O
the	O
OOB	O
error	O
stabilizes	O
,	O
it	O
will	O
converge	O
to	O
the	O
cross-validation	B-Application
(	O
specifically	O
leave-one-out	O
cross-validation	B-Application
)	O
error	O
.	O
</s>
<s>
Out-of-bag	B-Algorithm
error	I-Algorithm
is	O
used	O
frequently	O
for	O
error	O
estimation	O
within	O
random	B-Algorithm
forests	I-Algorithm
but	O
with	O
the	O
conclusion	O
of	O
a	O
study	O
done	O
by	O
Silke	O
Janitza	O
and	O
Roman	O
Hornung	O
,	O
out-of-bag	B-Algorithm
error	I-Algorithm
has	O
shown	O
to	O
overestimate	O
in	O
settings	O
that	O
include	O
an	O
equal	O
number	O
of	O
observations	O
from	O
all	O
response	O
classes	O
(	O
balanced	O
samples	O
)	O
,	O
small	O
sample	O
sizes	O
,	O
a	O
large	O
number	O
of	O
predictor	O
variables	O
,	O
small	O
correlation	O
between	O
predictors	O
,	O
and	O
weak	O
effects	O
.	O
</s>
