MAPMultinomialGaussianPrior.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. #include "core/image/ImageT.h"
  10. #include "core/vector/VectorT.h"
  11. #include "core/vector/MatrixT.h"
  12. #include <set>
  13. #include "vislearning/cbaselib/LabeledSet.h"
  14. #include "core/vector/VVector.h"
  15. #include "MAPEstimation.h"
  16. namespace OBJREC {
  17. /** MAP estimation of multinomial with gaussian prior */
  18. class MAPMultinomialGaussianPrior : public MAPEstimation
  19. {
  20. protected:
  21. // refactor-nice.pl: check this substitution
  22. // old: double estimateLambda ( const Vector & counts,
  23. double estimateLambda ( const NICE::Vector & counts,
  24. // refactor-nice.pl: check this substitution
  25. // old: const Vector & mu,
  26. const NICE::Vector & mu,
  27. double sigmaq );
  28. double estimateLambdaNonLinear
  29. // refactor-nice.pl: check this substitution
  30. // old: ( const Vector & counts,
  31. ( const NICE::Vector & counts,
  32. // refactor-nice.pl: check this substitution
  33. // old: const Vector & mu,
  34. const NICE::Vector & mu,
  35. double sigmaq );
  36. // refactor-nice.pl: check this substitution
  37. // old: double objective ( const Vector & theta,
  38. double objective ( const NICE::Vector & theta,
  39. // refactor-nice.pl: check this substitution
  40. // old: const Vector & counts,
  41. const NICE::Vector & counts,
  42. // refactor-nice.pl: check this substitution
  43. // old: const Vector & mu,
  44. const NICE::Vector & mu,
  45. double sigmaq );
  46. public:
  47. /** simple constructor */
  48. MAPMultinomialGaussianPrior();
  49. /** simple destructor */
  50. virtual ~MAPMultinomialGaussianPrior();
  51. // refactor-nice.pl: check this substitution
  52. // old: static void normalizeProb ( Vector & x );
  53. static void normalizeProb ( NICE::Vector & x );
  54. // refactor-nice.pl: check this substitution
  55. // old: void estimate ( Vector & theta,
  56. void estimate ( NICE::Vector & theta,
  57. // refactor-nice.pl: check this substitution
  58. // old: const Vector & counts,
  59. const NICE::Vector & counts,
  60. // refactor-nice.pl: check this substitution
  61. // old: const Vector & mu,
  62. const NICE::Vector & mu,
  63. double sigmaq );
  64. // refactor-nice.pl: check this substitution
  65. // old: void estimate ( Vector & mapEstimate,
  66. void estimate ( NICE::Vector & mapEstimate,
  67. const NICE::VVector & likelihoodDistributionSamples,
  68. const NICE::VVector & priorDistributionSamples,
  69. double sigmaq );
  70. };
  71. } // namespace
  72. #endif