Maintain the sample mean and covariance of the response variables inside a private data member called __statistics. Every time the update method is called, possibly with missing values (i.e. numpy.nan) in the response matrix Y, do the following:
Compute the conditional posterior mean and covariance over these missing values via a query to self.__statistics (if there are no missing values, then the mean is Y and the covariance is zero);
Update self.__statistics incrementally using this posterior mean and covariance; and
Inside the update loop, update each hypothesis in self.__hypotheses by passing in the stored basis functions evaluated at X, and posterior mean and covariance over Y.
Maintain the sample mean and covariance of the response variables inside a private data member called
__statistics
. Every time theupdate
method is called, possibly with missing values (i.e.numpy.nan
) in the response matrixY
, do the following:self.__statistics
(if there are no missing values, then the mean isY
and the covariance is zero);self.__statistics
incrementally using this posterior mean and covariance; andself.__hypotheses
by passing in the stored basis functions evaluated atX
, and posterior mean and covariance overY
.