LHCumulativeGauss.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. /** @class LHCumulativeGauss
  11. * cumulative gauss function
  12. *
  13. * @author Erik Rodner
  14. */
  15. class LHCumulativeGauss : public LikelihoodFunction
  16. {
  17. protected:
  18. double lengthScale;
  19. double bias;
  20. public:
  21. /** a length scale of the likelihood function correspondes
  22. * to a an inverse scaling of the gp prior, thus you
  23. * could optimize this parameter by optimizing a hyperparameter
  24. * of the kernel function */
  25. LHCumulativeGauss( double lengthScale = 1.0, double bias = 0.0 );
  26. /** needed for hyperparameter estimation */
  27. double thirdgrad ( double y, double f ) const;
  28. double hessian ( double y, double f ) const;
  29. double gradient ( double y, double f ) const;
  30. double logLike ( double y, double f ) const;
  31. double likelihood ( double y, double f ) const;
  32. double predictAnalytically ( double fmean, double fvariance ) const;
  33. static double stdNormPDF (double x);
  34. };
  35. }
  36. #endif