I am implementing a paper "Probabilistic Principal Component Analysis" (PPCA) which deals with a dataset where each vector suffers from at least one missing value missing values. Generally, PPCA offers a natural approach to the estimation of the principal axes in cases where some, or indeed all, of the data vectors exhibit one or more missing values (at random).
The actual question is in Matlab the missing values are marked as NaN. So how do we handle these NaN values. In PPCA we need to calculate the covariance matrix of the data, but since it contains missing values as NaN it's not straight forward. Note: However, we do not replace missing data by the sample mean in PPCA.
Can someone provide some insight into this issue of handling missing data. The data set is a $N\times D$ matrix where $N$ is the number of observations and $D$ is the dimension.
Link to paper: http://www.robots.ox.ac.uk/~cvrg/hilary2006/ppca.pdf