SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
SparseInverseCovariance.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  * Copyright (C) 2012 Sergey Lisitsyn
8  */
9 
10 #ifndef SPINVCOV_H_
11 #define SPINVCOV_H_
12 
13 #include <shogun/lib/config.h>
14 #ifdef USE_GPL_SHOGUN
15 
16 #include <shogun/base/SGObject.h>
17 #include <shogun/lib/SGMatrix.h>
18 
19 namespace shogun
20 {
21 
26 class CSparseInverseCovariance : public CSGObject
27 {
28 public:
29 
31  CSparseInverseCovariance();
32 
34  virtual ~CSparseInverseCovariance();
35 
41  SGMatrix<float64_t> estimate(SGMatrix<float64_t> S, float64_t lambda_c);
42 
44  const char* get_name() const { return "SparseInverseCovariance"; };
45 
46 
50  int32_t get_lasso_max_iter() const { return m_lasso_max_iter; }
54  int32_t get_max_iter() const { return m_max_iter; }
58  float64_t get_f_gap() const { return m_f_gap; }
62  float64_t get_x_gap() const { return m_x_gap; }
66  float64_t get_xtol() const { return m_xtol; }
67 
71  void set_lasso_max_iter(int32_t lasso_max_iter)
72  {
73  m_lasso_max_iter = lasso_max_iter;
74  }
78  void set_max_iter(int32_t max_iter)
79  {
80  m_max_iter = max_iter;
81  }
85  void set_f_gap(int32_t f_gap)
86  {
87  m_f_gap = f_gap;
88  }
92  void set_x_gap(int32_t x_gap)
93  {
94  m_x_gap = x_gap;
95  }
99  void set_xtol(int32_t xtol)
100  {
101  m_xtol = xtol;
102  }
103 
104 private:
105 
107  void register_parameters();
108 
109 protected:
110 
112  int32_t m_lasso_max_iter;
113 
115  int32_t m_max_iter;
116 
118  float64_t m_f_gap;
119 
121  float64_t m_x_gap;
122 
124  float64_t m_xtol;
125 };
126 
127 }
128 #endif //USE_GPL_SHOGUN
129 #endif
double float64_t
Definition: common.h:50
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18

SHOGUN Machine Learning Toolbox - Documentation