data : observations, could be actively or passively
acquired (meta-data).
model : assumptions, based on previous experience
(other data! transfer learning etc), or beliefs about the regularities
of the universe. Inductive bias.
prediction : an action to be taken or a
categorization or a quality score.
a prediction function\(f(\cdot)\) includes our beliefs about the
regularities of the universe
an objective function\(E(\cdot)\) defines the cost of
misprediction.
Overdetermined System
\(y= mx+ c\)
point 1: \(x= 1\), \(y=3\)\[
3 = m + c
\]
point 2: \(x= 3\), \(y=1\)\[
1 = 3m + c
\]
point 3: \(x= 2\), \(y=2.5\)\[
2.5 = 2m + c
\]
Pierre-Simon Laplace
Laplace’s Gremlin
Latent Variables
\(y= mx+ c + \epsilon\)
point 1: \(x= 1\), \(y=3\)\[
3 = m + c + \epsilon_1
\]
point 2: \(x= 3\), \(y=1\)\[
1 = 3m + c + \epsilon_2
\]
point 3: \(x= 2\), \(y=2.5\)\[
2.5 = 2m + c + \epsilon_3
\]
A Probabilistic Process
Set the mean of Gaussian to be a function. \[
p\left(y_i|x_i\right)=\frac{1}{\sqrt{2\pi\sigma^2}}\exp
\left(-\frac{\left(y_i-f\left(x_i\right)\right)^{2}}{2\sigma^2}\right).
\]
Then \[
\mathbf{ y}\sim \mathscr{N}\left(\mathbf{W}\boldsymbol{
\mu},\mathbf{W}\mathbf{C}\mathbf{W}^\top + \boldsymbol{ \Sigma}\right).
\] If \(\boldsymbol{
\Sigma}=\sigma^2\mathbf{I}\), this is Probabilistic PCA (Tipping and Bishop,
1999).
Objective Optimization
Multivariate Derivatives
We will need some multivariate calculus.
For now some simple multivariate differentiation: \[\frac{\text{d}{\mathbf{a}^{\top}}{\mathbf{
w}}}{\text{d}\mathbf{ w}}=\mathbf{a}\] and \[\frac{\mathbf{ w}^{\top}\mathbf{A}\mathbf{
w}}{\text{d}\mathbf{
w}}=\left(\mathbf{A}+\mathbf{A}^{\top}\right)\mathbf{ w}\] or if
\(\mathbf{A}\) is symmetric
(i.e.\(\mathbf{A}=\mathbf{A}^{\top}\)) \[\frac{\text{d}\mathbf{
w}^{\top}\mathbf{A}\mathbf{ w}}{\text{d}\mathbf{ w}}=2\mathbf{A}\mathbf{
w}.\]
Differentiate the Objective
Differentiating with respect to the vector \(\mathbf{ w}\) we obtain
Solve the matrix equation for \(\mathbf{ w}\). \[\boldsymbol{ \Phi}^\top \boldsymbol{
\Phi}\mathbf{ w}= \boldsymbol{ \Phi}^\top \mathbf{ y}\]
The equation for \(\left.\sigma^2\right.^{*}\) may also be
found \[\left.\sigma^2\right.^{{*}}=\frac{\sum_{i=1}^{n}\left(y_i-\left.\mathbf{
w}^{*}\right.^{\top}\mathbf{ x}_i\right)^{2}}{n}.\]
Movie Violence Data
Data containing movie information (year, length, rating, genre, IMDB
Rating).
Try and predict what factors influence a movie’s violence
Multivariate Regression on Movie Violence Data
Regress from features Year, Body_Count,
Length_Minutes to IMDB_Rating.
Residuals
Underdetermined System
Underdetermined System
What about two unknowns and one observation? \[y_1 = mx_1 + c\]
Can compute \(m\) given \(c\). \[m =
\frac{y_1 - c}{x}\]
Underdetermined System
Two Dimensional Gaussian
Consider height, \(h/m\) and
weight, \(w/kg\).
Could sample height from a distribution: \[
p(h) \sim \mathscr{N}\left(1.7,0.0225\right).
\]
And similarly weight: \[
p(w) \sim \mathscr{N}\left(75,36\right).
\]
Then \[
\mathbf{ y}\sim \mathscr{N}\left(\mathbf{W}\boldsymbol{
\mu},\mathbf{W}\mathbf{C}\mathbf{W}^\top + \boldsymbol{ \Sigma}\right).
\] If \(\boldsymbol{
\Sigma}=\sigma^2\mathbf{I}\), this is Probabilistic PCA (Tipping and Bishop,
1999).
We will consider a Gaussian with a particular structure of
covariance matrix.
Generate a single sample from this 25 dimensional Gaussian density,
\[
\mathbf{ f}=\left[f_{1},f_{2}\dots f_{25}\right].
\]
We will plot these points against their index.
Sampling a Function from a Gaussian
Joint Density of \(f_1\) and \(f_2\)
Prediction of \(f_{2}\) from \(f_{1}\)
Uluru
Prediction of \(f_2\) from \(f_1\)
Conditional density is also Gaussian. \[
p(f_2|f_1) = \mathscr{N}\left(f_2|\frac{k_{1, 2}}{k_{1, 1}}f_1, k_{2, 2}
- \frac{k_{1,2}^2}{k_{1,1}}\right)
\] where covariance of joint density is given by \[
\mathbf{K}= \begin{bmatrix} k_{1, 1} & k_{1, 2}\\ k_{2, 1} &
k_{2, 2}.\end{bmatrix}
\]
Joint Density of \(f_1\) and \(f_8\)
Prediction of \(f_{8}\) from \(f_{1}\)
Details
The single contour of the Gaussian density represents the
joint distribution, \(p(f_1, f_8)\)
We observe a value for \(f_1=-?\)
Conditional density: \(p(f_8|f_1=?)\).
Multivariate Conditional Density
Prediction of \(\mathbf{ f}_*\)
from \(\mathbf{ f}\).
Multivariate conditional density is also Gaussian. \[
p(\mathbf{ f}_*|\mathbf{ f}) = {\mathcal{N}\left(\mathbf{
f}_*|\mathbf{K}_{*,\mathbf{ f}}\mathbf{K}_{\mathbf{ f},\mathbf{
f}}^{-1}\mathbf{ f},\mathbf{K}_{*,*}-\mathbf{K}_{*,\mathbf{ f}}
\mathbf{K}_{\mathbf{ f},\mathbf{ f}}^{-1}\mathbf{K}_{\mathbf{
f},*}\right)}
\]
Here covariance of joint density is given by \[
\mathbf{K}= \begin{bmatrix} \mathbf{K}_{\mathbf{ f}, \mathbf{ f}} &
\mathbf{K}_{*, \mathbf{ f}}\\ \mathbf{K}_{\mathbf{ f}, *} &
\mathbf{K}_{*, *}\end{bmatrix}
\]
Multivariate Conditional Density
Prediction of \(\mathbf{ f}_*\)
from \(\mathbf{ f}\).
Here covariance of joint density is given by \[
\mathbf{K}= \begin{bmatrix} \mathbf{K}_{\mathbf{ f}, \mathbf{ f}} &
\mathbf{K}_{*, \mathbf{ f}}\\ \mathbf{K}_{\mathbf{ f}, *} &
\mathbf{K}_{*, *}\end{bmatrix}
\]
In practice we shouldn’t be using matrix inverse directly to solve
the GP system. One more stable way is to compute the Cholesky
decomposition of the kernel matrix. The log determinant of the
covariance can also be derived from the Cholesky decomposition.
Capacity Control
Gradients of the Likelihood
Overall Process Scale
Capacity Control and Data Fit
Learning Covariance Parameters
Can we determine covariance parameters from the data?
Andrade-Pacheco, R., Mubangizi, M., Quinn, J., Lawrence, N.D., 2014.
Consistent mapping of government malaria records across a changing
territory delimitation. Malaria Journal 13, 5. https://doi.org/10.1186/1475-2875-13-S1-P5
Cho, Y., Saul, L.K., 2009. Kernel
methods for deep learning, in: Bengio, Y., Schuurmans, D., Lafferty,
J.D., Williams, C.K.I., Culotta, A. (Eds.), Advances in Neural
Information Processing Systems 22. Curran Associates, Inc., pp. 342–350.
MacKay, D.J.C., 1992. Bayesian methods for adaptive models (PhD thesis).
California Institute of Technology.
Mubangizi, M., Andrade-Pacheco, R., Smith, M.T., Quinn, J., Lawrence,
N.D., 2014. Malaria surveillance with multiple data sources using
Gaussian process models, in: 1st International Conference
on the Use of Mobile ICT in Africa.
Neal, R.M., 1994. Bayesian learning for neural networks (PhD thesis).
Dept. of Computer Science, University of Toronto.
Rogers, S., Girolami, M., 2011. A first course in machine learning. CRC
Press.
Tipping, M.E., Bishop, C.M., 1999. Probabilistic principal component
analysis. Journal of the Royal Statistical Society, B 6, 611–622. https://doi.org/doi:10.1111/1467-9868.00196