MAPMultinomialGaussianPrior.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /**
  2. * @file MAPMultinomialGaussianPrior.h
  3. * @brief MAP estimation of multinomial with gaussian prior
  4. * @author Erik Rodner
  5. * @date 05/26/2008
  6. */
  7. #ifndef MAPMULTINOMIALGAUSSIANPRIORINCLUDE
  8. #define MAPMULTINOMIALGAUSSIANPRIORINCLUDE
  9. #ifdef NOVISUAL
  10. #include <vislearning/nice_nonvis.h>
  11. #else
  12. #include <vislearning/nice.h>
  13. #endif
  14. #include <set>
  15. #include "vislearning/cbaselib/LabeledSet.h"
  16. #include "core/vector/VVector.h"
  17. #include "MAPEstimation.h"
  18. namespace OBJREC {
  19. /** MAP estimation of multinomial with gaussian prior */
  20. class MAPMultinomialGaussianPrior : public MAPEstimation
  21. {
  22. protected:
  23. // refactor-nice.pl: check this substitution
  24. // old: double estimateLambda ( const Vector & counts,
  25. double estimateLambda ( const NICE::Vector & counts,
  26. // refactor-nice.pl: check this substitution
  27. // old: const Vector & mu,
  28. const NICE::Vector & mu,
  29. double sigmaq );
  30. double estimateLambdaNonLinear
  31. // refactor-nice.pl: check this substitution
  32. // old: ( const Vector & counts,
  33. ( const NICE::Vector & counts,
  34. // refactor-nice.pl: check this substitution
  35. // old: const Vector & mu,
  36. const NICE::Vector & mu,
  37. double sigmaq );
  38. // refactor-nice.pl: check this substitution
  39. // old: double objective ( const Vector & theta,
  40. double objective ( const NICE::Vector & theta,
  41. // refactor-nice.pl: check this substitution
  42. // old: const Vector & counts,
  43. const NICE::Vector & counts,
  44. // refactor-nice.pl: check this substitution
  45. // old: const Vector & mu,
  46. const NICE::Vector & mu,
  47. double sigmaq );
  48. public:
  49. /** simple constructor */
  50. MAPMultinomialGaussianPrior();
  51. /** simple destructor */
  52. virtual ~MAPMultinomialGaussianPrior();
  53. // refactor-nice.pl: check this substitution
  54. // old: static void normalizeProb ( Vector & x );
  55. static void normalizeProb ( NICE::Vector & x );
  56. // refactor-nice.pl: check this substitution
  57. // old: void estimate ( Vector & theta,
  58. void estimate ( NICE::Vector & theta,
  59. // refactor-nice.pl: check this substitution
  60. // old: const Vector & counts,
  61. const NICE::Vector & counts,
  62. // refactor-nice.pl: check this substitution
  63. // old: const Vector & mu,
  64. const NICE::Vector & mu,
  65. double sigmaq );
  66. // refactor-nice.pl: check this substitution
  67. // old: void estimate ( Vector & mapEstimate,
  68. void estimate ( NICE::Vector & mapEstimate,
  69. const NICE::VVector & likelihoodDistributionSamples,
  70. const NICE::VVector & priorDistributionSamples,
  71. double sigmaq );
  72. };
  73. } // namespace
  74. #endif