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 _KERNELPERCEPTRON_H___ 00012 #define _KERNELPERCEPTRON_H___ 00013 00014 #include <stdio.h> 00015 #include "lib/common.h" 00016 #include "features/Features.h" 00017 #include "classifier/KernelMachine.h" 00018 00019 namespace shogun 00020 { 00024 class CKernelPerceptron : public CKernelMachine 00025 { 00026 public: 00028 CKernelPerceptron(); 00029 virtual ~CKernelPerceptron(); 00030 00039 virtual bool train(CFeatures* data=NULL); 00040 00046 virtual float64_t classify_example(int32_t num); 00047 00053 virtual bool load(FILE* srcfile); 00054 00060 virtual bool save(FILE* dstfile); 00061 00066 inline virtual EClassifierType get_classifier_type() 00067 { 00068 return CT_KERNELPERCEPTRON; 00069 } 00070 00072 inline virtual const char* get_name() const { return "KernelPerceptron"; } 00073 }; 00074 } 00075 #endif