Covariance matrix
A covariance matrix is a square matrix whose diagonal entries are variances and whose off-diagonal entries are pairwise covariances among variables.
Math and Architectures of Deep Learning
A matrix summarizing variances and covariances among dimensions.
- How it is used
- Characterizes multidimensional data spread for PCA, Gaussian distributions, mixture models, and stochastic latent-space mappings.
- How deep it goes
- Derives directional variance as a quadratic form and connects eigendecomposition and SVD to PCA computation.
- Examples
- Uses two- and three-dimensional point sets, mean-centered data matrices, Gaussian point clouds, GMM clusters, and a PyTorch multivariate normal.
- What you can do after
- Evaluate/understand directional spread, principal axes, Gaussian shapes, and covariance-based PCA computations.
Read how Math and Architectures of Deep Learning explains covariance matrix →
Build a Robo-Advisor with Python (From Scratch)
A covariance matrix is a square symmetric matrix containing asset variances on its diagonal and pairwise covariances off the diagonal.
- How it is used
- Supplies the portfolio-risk input for volatility calculation, asset allocation, and optimization.
- How deep it goes
- Defines matrix entries, derives portfolio volatility, implements construction, and notes estimation and validity limits.
- Examples
- Uses three-asset correlation and volatility inputs, FE/WMT/AAPL historical returns, and a two-asset risk-parity portfolio.
- What you can do after
- Apply it via NumPy or pandas to estimate covariance and calculate portfolio volatility.
Read how Build a Robo-Advisor with Python (From Scratch) explains covariance matrix →
Outlier Detection in Python
A covariance matrix is a square matrix containing the variances of variables on its diagonal and their pairwise covariances elsewhere.
- How it is used
- Uses feature spread and correlation to model data shape for distance-based outlier detection.
- How deep it goes
- Defines the matrix, explains its geometric and distance-scoring roles, and demonstrates robust estimation without deriving covariance calculations.
- Examples
- Fits MinCovDet to three correlated features and enlarges Gaussian-mixture covariance matrices to generate wider-ranging synthetic data.
- What you can do after
- Apply it via scikit-learn’s MinCovDet to estimate data shape and score Mahalanobis distances, while checking single-cluster assumptions.
Read how Outlier Detection in Python explains covariance matrix →
Bayesian Optimization in Action
A covariance matrix is a matrix whose diagonal contains variances and whose off-diagonal entries contain covariances between components of a multivariate random variable.
- How it is used
- Uses covariance matrices to model relationships and uncertainty among variables in multivariate Gaussian distributions.
- How deep it goes
- Defines diagonal and off-diagonal meanings, then illustrates distance-dependent covariance and conditioning without deriving matrix computations.
- Examples
- Uses housing prices, a 20-dimensional street model, covariance heat maps, and conditioned Gaussian visualizations.
- What you can do after
- Evaluate how observed variables should update predictions and uncertainty for correlated variables.
Read how Bayesian Optimization in Action explains covariance matrix →
Data Without Labels
A covariance matrix is a square matrix whose entries represent pairwise covariances among variables.
- How it is used
- Uses pairwise covariances to describe feature relationships while PCA reduces redundancy.
- How deep it goes
- Explains covariance through PCA’s redundancy-reduction objective without detailing matrix construction or computation.
- Examples
- Uses house-price variables and linear combinations of area, bedrooms, distance, and schools.
- What you can do after
- Evaluate how PCA reduces feature redundancy by minimizing covariance between feature pairs.
Related concepts
- principal component analysisused by · Principal component analysis is a linear dimensionality-reduction technique that transforms data into orthogonal components ordered by the variance they capture.
- normal distributionpart of · A normal distribution is a continuous probability distribution with a symmetric, bell-shaped density determined by its mean and variance.
- risk contributionused by · A risk contribution is the fraction of a portfolio's variance risk attributable to an asset or subportfolio, calculated as its covariance with the full portfolio divided by the portfolio variance.
- Gaussian mixture modelused by · A Gaussian mixture model is a probabilistic model representing a distribution as a weighted combination of multiple Gaussian component distributions.
- tracking errormeasures · Tracking error is the variability or magnitude of an investment's return difference from the benchmark or reference portfolio it is intended to follow.
- Gaussian processused by · A Gaussian process is a probability distribution over functions in which every finite collection of function values has a joint Gaussian distribution.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




