This variational_approx_example program demonstrates the usage of Shogun's L-BFGS API and the LogitPiecewiseBoundLikelihood class.
First, we generate synthetic data (labels) from a Gaussian distribution with logit link function (A.K.A logistic activation function).
Then, we use the KL method (Nickisch, Hannes, and Carl Edward Rasmussen,
"Approximations for Binary Gaussian Process Classification." JMLR (2008)) to find model parameters.
In this example, we use a Gaussian distribution with identity covariance matrix
to approximate the posterior distribution by directly minimizing the KL divergence
between these distributions via the L-BFGS technique.
Note that we use the LogitPiecewiseBoundLikelihood class to compute gradient and function value during the L-BFGS iteration.
