Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.38 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #ifndef SVM_H
  2. #define SVM_H
  3.  
  4. #include <vector>
  5. #include "libsvm.h"
  6.  
  7. class svm
  8. {
  9. public:
  10.         svm();
  11.         ~svm();
  12.         void train(float* features, int* labels, int feature_size, int feature_num);
  13.         int classify(float* feature);
  14. private:
  15.         void clean_up();
  16.         svm_problem problem;
  17.         svm_parameter param;
  18.         svm_node* x_space;
  19.         svm_model* model;
  20.         float scale;
  21.         int feature_length;
  22. };
  23.  
  24. #endif