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 _LIBSVM_MULTICLASS_H___ 00012 #define _LIBSVM_MULTICLASS_H___ 00013 00014 #include <shogun/lib/common.h> 00015 #include <shogun/multiclass/MulticlassSVM.h> 00016 #include <shogun/lib/external/shogun_libsvm.h> 00017 #include <shogun/classifier/svm/LibSVM.h> 00018 00019 namespace shogun 00020 { 00023 class CMulticlassLibSVM : public CMulticlassSVM 00024 { 00025 public: 00027 CMulticlassLibSVM(LIBSVM_SOLVER_TYPE st=LIBSVM_C_SVC); 00028 00035 CMulticlassLibSVM(float64_t C, CKernel* k, CLabels* lab); 00036 00038 virtual ~CMulticlassLibSVM(); 00039 00044 virtual EMachineType get_classifier_type() { return CT_LIBSVMMULTICLASS; } 00045 00047 virtual const char* get_name() const { return "MulticlassLibSVM"; } 00048 00049 protected: 00058 virtual bool train_machine(CFeatures* data=NULL); 00059 00060 protected: 00062 svm_problem problem; 00064 svm_parameter param; 00065 00067 struct svm_model* model; 00068 00070 LIBSVM_SOLVER_TYPE solver_type; 00071 }; 00072 } 00073 #endif