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-2008 Soeren Sonnenburg 00008 * Copyright (C) 1999-2008 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 "kernel/KernelMachine.h" 00018 00020 class CKernelPerceptron : public CKernelMachine 00021 { 00022 public: 00024 CKernelPerceptron(); 00025 virtual ~CKernelPerceptron(); 00026 00028 virtual bool train(); 00029 00035 virtual DREAL classify_example(INT num); 00036 00042 virtual bool load(FILE* srcfile); 00043 00049 virtual bool save(FILE* dstfile); 00050 00055 inline virtual EClassifierType get_classifier_type() 00056 { 00057 return CT_KERNELPERCEPTRON; 00058 } 00059 }; 00060 #endif 00061