KernelUtils.h 947 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * @file KernelUtils.h
  3. * @author Erik Rodner
  4. * @date 03/01/2010
  5. */
  6. #ifndef _NICE_OBJREC_KERNELUTILSINCLUDE
  7. #define _NICE_OBJREC_KERNELUTILSINCLUDE
  8. #include <vector>
  9. #include "core/vector/MatrixT.h"
  10. #include "core/basics/Config.h"
  11. namespace OBJREC {
  12. /** @class KernelUtils
  13. * some utilities to select kernel sub matrices etc.
  14. *
  15. * @author Erik Rodner
  16. */
  17. class KernelUtils
  18. {
  19. public:
  20. static void selectExamples ( const NICE::Config *conf, const NICE::Vector & labels,
  21. std::vector<int> & trainSelection, std::vector<int> & testSelection );
  22. static void getKernelMatrix ( const std::vector<int> & trainSelection,
  23. const NICE::Matrix & kernelMatrix, const NICE::Vector & labels,
  24. NICE::Matrix & kernelMatrixTrain, NICE::Vector & labelsTrain );
  25. static void getKernelVector ( const std::vector<int> & trainSelection,
  26. const NICE::Matrix & kernelMatrix, uint index, NICE::Vector & kernelVector );
  27. };
  28. }
  29. #endif