00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 1999-2009 Soeren Sonnenburg 00008 * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society 00009 */ 00010 00011 #ifndef _LIBSVR_H___ 00012 #define _LIBSVR_H___ 00013 00014 #include <stdio.h> 00015 00016 #include <shogun/lib/common.h> 00017 #include <shogun/classifier/svm/SVM.h> 00018 #include <shogun/lib/external/shogun_libsvm.h> 00019 #include <shogun/regression/Regression.h> 00020 00021 namespace shogun 00022 { 00051 class CLibSVR : public CSVM 00052 { 00053 public: 00055 MACHINE_PROBLEM_TYPE(PT_REGRESSION); 00056 00058 CLibSVR(); 00059 00067 CLibSVR(float64_t C, float64_t epsilon, CKernel* k, CLabels* lab); 00068 virtual ~CLibSVR(); 00069 00074 virtual EMachineType get_classifier_type(); 00075 00077 virtual const char* get_name() const { return "LibSVR"; } 00078 00079 protected: 00088 virtual bool train_machine(CFeatures* data=NULL); 00089 protected: 00091 svm_problem problem; 00093 svm_parameter param; 00094 00096 struct svm_model* model; 00097 }; 00098 } 00099 #endif