SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
transfer
multitask
MultitaskLeastSquaresRegression.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 MULTITASKLSREGRESSION_H_
11
#define MULTITASKLSREGRESSION_H_
12
13
#include <
shogun/lib/config.h
>
14
#include <
shogun/transfer/multitask/TaskRelation.h
>
15
#include <
shogun/transfer/multitask/MultitaskLinearMachine.h
>
16
17
namespace
shogun
18
{
27
class
CMultitaskLeastSquaresRegression
:
public
CMultitaskLinearMachine
28
{
29
30
public
:
32
MACHINE_PROBLEM_TYPE
(
PT_REGRESSION
)
33
34
35
CMultitaskLeastSquaresRegression
();
36
44
CMultitaskLeastSquaresRegression
(
45
float64_t
z,
CDotFeatures
* training_data,
46
CRegressionLabels
* training_labels,
CTaskRelation
* task_relation);
47
49
virtual
~CMultitaskLeastSquaresRegression
();
50
52
virtual
const
char
*
get_name
()
const
53
{
54
return
"MultitaskLeastSquaresRegression"
;
55
}
56
58
int32_t
get_max_iter
()
const
;
60
float64_t
get_q
()
const
;
62
int32_t
get_regularization
()
const
;
64
int32_t
get_termination
()
const
;
66
float64_t
get_tolerance
()
const
;
68
float64_t
get_z
()
const
;
69
71
void
set_max_iter
(int32_t max_iter);
73
void
set_q
(
float64_t
q);
75
void
set_regularization
(int32_t regularization);
77
void
set_termination
(int32_t termination);
79
void
set_tolerance
(
float64_t
tolerance);
81
void
set_z
(
float64_t
z);
82
84
virtual
float64_t
apply_one
(int32_t i);
85
86
protected
:
87
89
virtual
bool
train_machine
(
CFeatures
* data=NULL);
90
92
virtual
bool
train_locked_implementation
(
SGVector<index_t>
* tasks);
93
94
private
:
95
97
void
register_parameters();
98
100
void
initialize_parameters();
101
102
protected
:
103
105
int32_t
m_regularization
;
106
108
int32_t
m_termination
;
109
111
int32_t
m_max_iter
;
112
114
float64_t
m_tolerance
;
115
117
float64_t
m_q
;
118
120
float64_t
m_z
;
121
122
};
123
}
124
#endif
SHOGUN
机器学习工具包 - 项目文档