LHCumulativeGauss.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /**
  2. * @file LHCumulativeGauss.h
  3. * @author Erik Rodner
  4. * @date 02/17/2010
  5. */
  6. #ifndef _NICE_OBJREC_LHCUMULATIVEGAUSSINCLUDE
  7. #define _NICE_OBJREC_LHCUMULATIVEGAUSSINCLUDE
  8. #include "LikelihoodFunction.h"
  9. namespace OBJREC
  10. {
  11. /** @class LHCumulativeGauss
  12. * cumulative gauss function
  13. *
  14. * @author Erik Rodner
  15. */
  16. class LHCumulativeGauss : public LikelihoodFunction
  17. {
  18. protected:
  19. double lengthScale;
  20. double bias;
  21. public:
  22. /** a length scale of the likelihood function correspondes
  23. * to a an inverse scaling of the gp prior, thus you
  24. * could optimize this parameter by optimizing a hyperparameter
  25. * of the kernel function */
  26. LHCumulativeGauss ( double lengthScale = 1.0, double bias = 0.0 );
  27. /** needed for hyperparameter estimation */
  28. double thirdgrad ( double y, double f ) const;
  29. double hessian ( double y, double f ) const;
  30. double gradient ( double y, double f ) const;
  31. double logLike ( double y, double f ) const;
  32. double likelihood ( double y, double f ) const;
  33. double predictAnalytically ( double fmean, double fvariance ) const;
  34. static double stdNormPDF ( double x );
  35. };
  36. }
  37. #endif