KernelNormalizer.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) 2008-2009 Soeren Sonnenburg
00008  * Copyright (C) 2008-2009 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #ifndef _KERNELNORMALIZER_H___
00012 #define _KERNELNORMALIZER_H___
00013 
00014 #include "kernel/Kernel.h"
00015 
00016 namespace shogun
00017 {
00018 
00020 enum ENormalizerType
00021 {
00022     N_REGULAR = 0,
00023     N_MULTITASK = 1
00024 };
00025 
00026 class CKernel;
00050 class CKernelNormalizer : public CSGObject
00051 {
00052     public:
00053 
00056         CKernelNormalizer()
00057         {
00058             m_type = N_REGULAR;
00059         }
00060 
00062         virtual ~CKernelNormalizer() { }
00063 
00066         virtual bool init(CKernel* k)=0;
00067 
00073         virtual float64_t normalize(
00074             float64_t value, int32_t idx_lhs, int32_t idx_rhs)=0;
00075 
00080         virtual float64_t normalize_lhs(float64_t value, int32_t idx_lhs)=0;
00081 
00086         virtual float64_t normalize_rhs(float64_t value, int32_t idx_rhs)=0;
00087 
00090         ENormalizerType get_normalizer_type()
00091         {
00092             return m_type;
00093         }
00094 
00098         void set_normalizer_type(ENormalizerType type)
00099         {
00100             m_type = type;
00101         }
00102 
00103     protected:
00105         ENormalizerType m_type;
00106 };
00107 }
00108 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation