LibSVMOneClass.h

Go to the documentation of this file.
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) 2006 Christian Gehl
00008  * Written (W) 2006-2009 Soeren Sonnenburg
00009  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
00010  */
00011 
00012 #ifndef _LIBSVM_ONECLASS_H___
00013 #define _LIBSVM_ONECLASS_H___
00014 #include <shogun/lib/common.h>
00015 #include <shogun/classifier/svm/SVM.h>
00016 #include <shogun/lib/external/shogun_libsvm.h>
00017 
00018 #include <stdio.h>
00019 
00020 namespace shogun
00021 {
00023 class CLibSVMOneClass : public CSVM
00024 {
00025     public:
00027         CLibSVMOneClass();
00028 
00034         CLibSVMOneClass(float64_t C, CKernel* k);
00035         virtual ~CLibSVMOneClass();
00036 
00041         virtual EMachineType get_classifier_type() { return CT_LIBSVMONECLASS; }
00042 
00044         virtual const char* get_name() const { return "LibSVMOneClass"; }
00045 
00046     protected:
00047 
00048         virtual bool train_require_labels() const { return false; }
00049 
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 };
00069 }
00070 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation