SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SigmoidKernel.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 1999-2010 Soeren Sonnenburg
8  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  * Copyright (C) 2010 Berlin Institute of Technology
10  */
11 
12 #include <shogun/lib/common.h>
14 
15 using namespace shogun;
16 
18 {
19  init();
20 }
21 
23 : CDotKernel(size)
24 {
25  init();
26 
27  gamma=g;
28  coef0=c;
29 }
30 
32  CDotFeatures* l, CDotFeatures* r, int32_t size, float64_t g, float64_t c)
33 : CDotKernel(size)
34 {
35  init();
36 
37  gamma=g;
38  coef0=c;
39 
40  init(l,r);
41 }
42 
44 {
45  cleanup();
46 }
47 
49 {
50 }
51 
52 bool CSigmoidKernel::init(CFeatures* l, CFeatures* r)
53 {
54  CDotKernel::init(l, r);
55  return init_normalizer();
56 }
57 
58 void CSigmoidKernel::init()
59 {
60  gamma=0.0;
61  coef0=0.0;
62 
63  SG_ADD(&gamma, "gamma", "Gamma.", MS_AVAILABLE);
64  SG_ADD(&coef0, "coef0", "Coefficient 0.", MS_AVAILABLE);
65 }

SHOGUN Machine Learning Toolbox - Documentation