svm-experiment.h

Go to the documentation of this file.
00001 // Copyright 2007, Massachusetts Institute of Technology.
00002 // The use of this code is permitted for research only. There is
00003 // absolutely no warranty for this software.
00004 //
00005 // Author: John Lee (jjl@mit.edu)
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 }  // namespace libpmk_util
00065 #endif  // EXPERIMENT_SVM_EXPERIMENT_H

Generated on Fri Sep 21 11:39:04 2007 for libpmk2 by  doxygen 1.5.1