12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #ifndef _NICE_OBJREC_GPREGRESSIONOPTIMIZATIONPROBLEMINCLUDE
- #define _NICE_OBJREC_GPREGRESSIONOPTIMIZATIONPROBLEMINCLUDE
- #include "core/vector/VVector.h"
- #include "vislearning/math/kernels/ParameterizedKernel.h"
- #include "core/optimization/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
|