trying to apply theory from Bishop's "Pattern Recognition and Machine Learning"