00001
00002
00003
00004
00005
00006
00007
00008 #ifndef EXPERIMENT_SVM_EXPERIMENT_H
00009 #define EXPERIMENT_SVM_EXPERIMENT_H
00010
00011 #include "experiment/experiment.h"
00012 #include "kernel/kernel-matrix.h"
00013 #include "util/labeled-index.h"
00014 #include "svm/svm.h"
00015
00016 using namespace libpmk;
00017
00018 namespace libpmk_util {
00019
00021
00029 class SVMExperiment : public Experiment {
00030 public:
00036 SVMExperiment(vector<LabeledIndex> training,
00037 vector<LabeledIndex> testing,
00038 const KernelMatrix& kernel,
00039 double c);
00040
00049 SVMExperiment(vector<LabeledIndex> training,
00050 const KernelMatrix& training_matrix,
00051 vector<LabeledIndex> testing,
00052 const Matrix& testing_matrix,
00053 double c);
00054
00055 virtual ~SVMExperiment();
00056
00057 virtual void Train();
00058 virtual int Test();
00059
00060 private:
00061 struct svm_parameter param_;
00062 struct svm_model *model_;
00063 };
00064 }
00065 #endif // EXPERIMENT_SVM_EXPERIMENT_H