SHOGUN
v3.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
classifier
FeatureBlockLogisticRegression.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 FEATUREBLOCKLOGISTICREGRESSION_H_
11
#define FEATUREBLOCKLOGISTICREGRESSION_H_
12
13
#include <
shogun/lib/config.h
>
14
#include <
shogun/lib/IndexBlockRelation.h
>
15
#include <
shogun/machine/LinearMachine.h
>
16
17
namespace
shogun
18
{
32
class
CFeatureBlockLogisticRegression
:
public
CLinearMachine
33
{
34
35
public
:
36
MACHINE_PROBLEM_TYPE
(
PT_BINARY
)
37
38
39
CFeatureBlockLogisticRegression
();
40
48
CFeatureBlockLogisticRegression
(
49
float64_t
z,
CDotFeatures
* training_data,
50
CBinaryLabels
* training_labels,
CIndexBlockRelation
* task_relation);
51
53
virtual
~CFeatureBlockLogisticRegression
();
54
56
virtual
const
char
*
get_name
()
const
57
{
58
return
"FeatureBlockLogisticRegression"
;
59
}
60
64
CIndexBlockRelation
*
get_feature_relation
()
const
;
65
69
void
set_feature_relation
(
CIndexBlockRelation
* feature_relation);
70
71
virtual
float64_t
apply_one
(int32_t vec_idx);
72
74
int32_t
get_max_iter
()
const
;
76
float64_t
get_q
()
const
;
78
int32_t
get_regularization
()
const
;
80
int32_t
get_termination
()
const
;
82
float64_t
get_tolerance
()
const
;
84
float64_t
get_z
()
const
;
85
87
void
set_max_iter
(int32_t max_iter);
89
void
set_q
(
float64_t
q);
91
void
set_regularization
(int32_t regularization);
93
void
set_termination
(int32_t termination);
95
void
set_tolerance
(
float64_t
tolerance);
97
void
set_z
(
float64_t
z);
98
99
protected
:
100
101
virtual
SGVector<float64_t>
apply_get_outputs
(
CFeatures
* data);
102
104
virtual
bool
train_machine
(
CFeatures
* data=NULL);
105
106
private
:
107
109
void
register_parameters();
110
112
void
init();
113
114
protected
:
115
117
CIndexBlockRelation
*
m_feature_relation
;
118
120
int32_t
m_regularization
;
121
123
int32_t
m_termination
;
124
126
int32_t
m_max_iter
;
127
129
float64_t
m_tolerance
;
130
132
float64_t
m_q
;
133
135
float64_t
m_z
;
136
137
};
138
}
139
#endif
SHOGUN
Machine Learning Toolbox - Documentation