123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- #ifndef _NICE_OBJREC_GPREGRESSIONOPTIMIZATIONPROBLEMINCLUDE
- #define _NICE_OBJREC_GPREGRESSIONOPTIMIZATIONPROBLEMINCLUDE
- #include "core/vector/VVector.h"
- #include "vislearning/math/kernels/ParameterizedKernel.h"
- #include "core/optimization/gradientBased/OptimizationProblemFirst.h"
- #include "vislearning/math/kernels/KernelData.h"
- #include "LaplaceApproximation.h"
- #include "LikelihoodFunction.h"
- namespace OBJREC
- {
- class GPLaplaceOptimizationProblem : public NICE::OptimizationProblemFirst
- {
- protected:
- KernelData *kernelData;
- NICE::VVector y;
- double bestAvgLooError;
- NICE::Vector bestLooParameters;
- ParameterizedKernel *kernel;
- bool verbose;
- const LikelihoodFunction *likelihoodFunction;
- std::vector<LaplaceApproximation *> laplaceApproximation;
- public:
-
- GPLaplaceOptimizationProblem ( KernelData *kernelData, const NICE::Vector & y,
- ParameterizedKernel *kernel, const LikelihoodFunction *likelihoodFunction,
- LaplaceApproximation *laplaceApproximation,
- bool verbose );
-
- GPLaplaceOptimizationProblem ( KernelData *kernelData, const NICE::VVector & y,
- ParameterizedKernel *kernel, const LikelihoodFunction *likelihoodFunction,
- const std::vector<LaplaceApproximation *> & laplaceApproximation,
- bool verbose );
-
- ~GPLaplaceOptimizationProblem();
-
- double computeObjective();
-
- void computeGradient ( NICE::Vector& newGradient );
-
- void setParameters ( const NICE::Vector & newParameters )
- {
- parameters() = newParameters;
- };
-
- void useLooParameters ();
-
- void update();
- };
- }
- #endif
|