Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <shogun/lib/common.h>
00013 #include <shogun/kernel/SigmoidKernel.h>
00014
00015 using namespace shogun;
00016
00017 CSigmoidKernel::CSigmoidKernel() : CDotKernel()
00018 {
00019 init();
00020 }
00021
00022 CSigmoidKernel::CSigmoidKernel(int32_t size, float64_t g, float64_t c)
00023 : CDotKernel(size)
00024 {
00025 init();
00026
00027 gamma=g;
00028 coef0=c;
00029 }
00030
00031 CSigmoidKernel::CSigmoidKernel(
00032 CDotFeatures* l, CDotFeatures* r, int32_t size, float64_t g, float64_t c)
00033 : CDotKernel(size)
00034 {
00035 init();
00036
00037 gamma=g;
00038 coef0=c;
00039
00040 init(l,r);
00041 }
00042
00043 CSigmoidKernel::~CSigmoidKernel()
00044 {
00045 cleanup();
00046 }
00047
00048 void CSigmoidKernel::cleanup()
00049 {
00050 }
00051
00052 bool CSigmoidKernel::init(CFeatures* l, CFeatures* r)
00053 {
00054 CDotKernel::init(l, r);
00055 return init_normalizer();
00056 }
00057
00058 void CSigmoidKernel::init()
00059 {
00060 gamma=0.0;
00061 coef0=0.0;
00062
00063 SG_ADD(&gamma, "gamma", "Gamma.", MS_AVAILABLE);
00064 SG_ADD(&coef0, "coef0", "Coefficient 0.", MS_AVAILABLE);
00065 }