SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
KRR.h
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) 2006 Mikio L. Braun
8  * Written (W) 1999-2009 Soeren Sonnenburg
9  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
10  */
11 
12 #ifndef _KRR_H__
13 #define _KRR_H__
14 
15 #include <shogun/lib/config.h>
17 
18 #ifdef HAVE_LAPACK
19 
21 
22 namespace shogun
23 {
54 class CKRR : public CKernelMachine
55 {
56  public:
58  CKRR();
59 
66  CKRR(float64_t tau, CKernel* k, CLabels* lab);
67  virtual ~CKRR();
68 
73  inline void set_tau(float64_t t) { tau = t; };
74 
79  virtual CLabels* apply();
80 
86  virtual float64_t apply(int32_t num);
87 
93  virtual bool load(FILE* srcfile);
94 
100  virtual bool save(FILE* dstfile);
101 
107  {
108  return CT_KRR;
109  }
110 
112  inline virtual const char* get_name() const { return "KRR"; }
113 
114  protected:
123  virtual bool train_machine(CFeatures* data=NULL);
124 
125  private:
127  float64_t *alpha;
129  float64_t tau;
130 };
131 }
132 #endif // HAVE_LAPACK
133 #endif // _KRR_H__

SHOGUN Machine Learning Toolbox - Documentation