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 "kernel/KernelMachine.h" 00018 00022 class CKernelPerceptron : public CKernelMachine 00023 { 00024 public: 00026 CKernelPerceptron(); 00027 virtual ~CKernelPerceptron(); 00028 00030 virtual bool train(); 00031 00037 virtual float64_t classify_example(int32_t num); 00038 00044 virtual bool load(FILE* srcfile); 00045 00051 virtual bool save(FILE* dstfile); 00052 00057 inline virtual EClassifierType get_classifier_type() 00058 { 00059 return CT_KERNELPERCEPTRON; 00060 } 00061 00063 inline virtual const char* get_name() const { return "KernelPerceptron"; } 00064 }; 00065 #endif 00066