SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
mathematics
SparseInverseCovariance.h
浏览该文件的文档.
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
#include <
shogun/base/SGObject.h
>
13
#include <
shogun/lib/SGMatrix.h
>
14
15
namespace
shogun
16
{
17
22
class
CSparseInverseCovariance
:
public
CSGObject
23
{
24
public
:
25
27
CSparseInverseCovariance
();
28
30
virtual
~CSparseInverseCovariance
();
31
37
SGMatrix<float64_t>
estimate
(
SGMatrix<float64_t>
S,
float64_t
lambda_c);
38
40
const
char
*
get_name
()
const
{
return
"SparseInverseCovariance"
; };
41
42
46
int32_t
get_lasso_max_iter
()
const
{
return
m_lasso_max_iter
; }
50
int32_t
get_max_iter
()
const
{
return
m_max_iter
; }
54
float64_t
get_f_gap
()
const
{
return
m_f_gap
; }
58
float64_t
get_x_gap
()
const
{
return
m_x_gap
; }
62
float64_t
get_xtol
()
const
{
return
m_xtol
; }
63
67
void
set_lasso_max_iter
(int32_t lasso_max_iter)
68
{
69
m_lasso_max_iter
= lasso_max_iter;
70
}
74
void
set_max_iter
(int32_t max_iter)
75
{
76
m_max_iter
= max_iter;
77
}
81
void
set_f_gap
(int32_t f_gap)
82
{
83
m_f_gap
= f_gap;
84
}
88
void
set_x_gap
(int32_t x_gap)
89
{
90
m_x_gap
= x_gap;
91
}
95
void
set_xtol
(int32_t xtol)
96
{
97
m_xtol
= xtol;
98
}
99
100
private
:
101
103
void
register_parameters();
104
105
protected
:
106
108
int32_t
m_lasso_max_iter
;
109
111
int32_t
m_max_iter
;
112
114
float64_t
m_f_gap
;
115
117
float64_t
m_x_gap
;
118
120
float64_t
m_xtol
;
121
};
122
123
}
124
#endif
SHOGUN
机器学习工具包 - 项目文档