<s>
In	O
statistics	O
,	O
sometimes	O
the	O
covariance	O
matrix	O
of	O
a	O
multivariate	B-General_Concept
random	I-General_Concept
variable	I-General_Concept
is	O
not	O
known	O
but	O
has	O
to	O
be	O
estimated	O
.	O
</s>
<s>
Estimation	B-General_Concept
of	I-General_Concept
covariance	I-General_Concept
matrices	I-General_Concept
then	O
deals	O
with	O
the	O
question	O
of	O
how	O
to	O
approximate	O
the	O
actual	O
covariance	O
matrix	O
on	O
the	O
basis	O
of	O
a	O
sample	O
from	O
the	O
multivariate	O
distribution	O
.	O
</s>
<s>
The	O
sample	O
covariance	O
matrix	O
(	O
SCM	O
)	O
is	O
an	O
unbiased	O
and	O
efficient	O
estimator	O
of	O
the	O
covariance	O
matrix	O
if	O
the	O
space	O
of	O
covariance	O
matrices	O
is	O
viewed	O
as	O
an	O
extrinsic	O
convex	O
cone	O
in	O
Rp×p	O
;	O
however	O
,	O
measured	O
using	O
the	O
intrinsic	O
geometry	O
of	O
positive-definite	B-Algorithm
matrices	I-Algorithm
,	O
the	O
SCM	O
is	O
a	O
biased	O
and	O
inefficient	O
estimator	O
.	O
</s>
<s>
Cases	O
involving	O
missing	O
data	O
,	O
heteroscedasticity	B-General_Concept
,	O
or	O
autocorrelated	O
residuals	O
require	O
deeper	O
considerations	O
.	O
</s>
<s>
Thus	O
the	O
estimation	B-General_Concept
of	I-General_Concept
covariance	I-General_Concept
matrices	I-General_Concept
directly	O
from	O
observational	O
data	O
plays	O
two	O
roles	O
:	O
</s>
<s>
Estimates	O
of	O
covariance	O
matrices	O
are	O
required	O
at	O
the	O
initial	O
stages	O
of	O
principal	B-Application
component	I-Application
analysis	I-Application
and	O
factor	O
analysis	O
,	O
and	O
are	O
also	O
involved	O
in	O
versions	O
of	O
regression	O
analysis	O
that	O
treat	O
the	O
dependent	O
variables	O
in	O
a	O
data-set	O
,	O
jointly	O
with	O
the	O
independent	O
variable	O
as	O
the	O
outcome	O
of	O
a	O
random	O
sample	O
.	O
</s>
<s>
The	O
reason	O
for	O
the	O
factor	O
n−1	O
rather	O
than	O
n	O
is	O
essentially	O
the	O
same	O
as	O
the	O
reason	O
for	O
the	O
same	O
factor	O
appearing	O
in	O
unbiased	O
estimates	O
of	O
sample	O
variances	O
and	O
sample	O
covariances	O
,	O
which	O
relates	O
to	O
the	O
fact	O
that	O
the	O
mean	O
is	O
not	O
known	O
and	O
is	O
replaced	O
by	O
the	O
sample	O
mean	O
(	O
see	O
Bessel	B-General_Concept
's	I-General_Concept
correction	I-General_Concept
)	O
.	O
</s>
<s>
It	O
follows	O
from	O
the	O
spectral	O
theorem	O
of	O
linear	B-Language
algebra	I-Language
that	O
a	O
positive-definite	O
symmetric	O
matrix	O
S	O
has	O
a	O
unique	O
positive-definite	O
symmetric	O
square	O
root	O
S1/2	O
.	O
</s>
<s>
i.e.	O
,	O
n	O
times	O
the	O
p×p	O
identity	B-Algorithm
matrix	I-Algorithm
.	O
</s>
<s>
The	O
parameter	O
belongs	O
to	O
the	O
set	O
of	O
positive-definite	B-Algorithm
matrices	I-Algorithm
,	O
which	O
is	O
a	O
Riemannian	B-Architecture
manifold	I-Architecture
,	O
not	O
a	O
vector	O
space	O
,	O
hence	O
the	O
usual	O
vector-space	O
notions	O
of	O
expectation	O
,	O
i.e.	O
</s>
<s>
Similarly	O
,	O
the	O
intrinsic	O
inefficiency	O
of	O
the	O
sample	O
covariance	O
matrix	O
depends	O
upon	O
the	O
Riemannian	O
curvature	O
of	O
the	O
space	O
of	O
positive-definite	B-Algorithm
matrices	I-Algorithm
.	O
</s>
<s>
it	O
cannot	O
be	O
inverted	O
to	O
compute	O
the	O
precision	B-General_Concept
matrix	I-General_Concept
.	O
</s>
<s>
One	O
considers	O
a	O
convex	O
combination	O
of	O
the	O
empirical	O
estimator	O
(	O
)	O
with	O
some	O
suitable	O
chosen	O
target	O
(	O
)	O
,	O
e.g.	O
,	O
the	O
diagonal	B-Algorithm
matrix	I-Algorithm
.	O
</s>
<s>
This	O
can	O
be	O
done	O
by	O
cross-validation	B-Application
,	O
or	O
by	O
using	O
an	O
analytic	O
estimate	O
of	O
the	O
shrinkage	O
intensity	O
.	O
</s>
<s>
the	O
identity	B-Algorithm
matrix	I-Algorithm
,	O
scaled	O
by	O
the	O
average	O
sample	O
variance	O
;	O
</s>
<s>
the	O
diagonal	B-Algorithm
matrix	I-Algorithm
containing	O
sample	O
variances	O
on	O
the	O
diagonal	O
and	O
zeros	O
everywhere	O
else	O
;	O
</s>
<s>
the	O
identity	B-Algorithm
matrix	I-Algorithm
.	O
</s>
<s>
Software	O
for	O
computing	O
a	O
covariance	O
shrinkage	O
estimator	O
is	O
available	O
in	O
R	B-Language
(	O
packages	O
corpcor	O
and	O
ShrinkCovMat	O
)	O
,	O
in	O
Python	B-Language
(	O
scikit-learn	B-Application
library	O
)	O
,	O
and	O
in	O
MATLAB	B-Language
.	O
</s>
