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
regression
svr
MKLRegression.cpp
Go to the documentation of this file.
1
#include <
shogun/regression/svr/MKLRegression.h
>
2
#include <
shogun/regression/svr/LibSVR.h
>
3
#ifdef USE_SVMLIGHT
4
#include <
shogun/regression/svr/SVRLight.h
>
5
#endif //USE_SVMLIGHT
6
7
using namespace
shogun;
8
9
CMKLRegression::CMKLRegression
(
CSVM
* s) :
CMKL
(s)
10
{
11
if
(!s)
12
{
13
#ifdef USE_SVMLIGHT
14
s=
new
CSVRLight
();
15
#endif //USE_SVMLIGHT
16
if
(!s)
17
s=
new
CLibSVR
();
18
set_svm
(s);
19
}
20
}
21
22
CMKLRegression::~CMKLRegression
()
23
{
24
}
25
26
float64_t
CMKLRegression::compute_sum_alpha
()
27
{
28
SG_NOTIMPLEMENTED
29
return
0;
30
31
// not correct needs explicit access to alpha and alpha*
32
//float64_t suma=0;
33
//int32_t nsv=svm->get_num_support_vectors();
34
//for (int32_t i=0; i<nsv; i++)
35
// suma+=CMath::abs(svm->get_alpha(i))*tube_epsilon-svm->get_alpha(i);
36
//return suma;
37
}
38
39
float64_t
CMKLRegression::compute_mkl_dual_objective
()
40
{
41
SG_NOTIMPLEMENTED
42
return
0;
43
}
44
45
void
CMKLRegression::init_training
()
46
{
47
ASSERT
(
m_labels
&&
m_labels
->
get_num_labels
())
48
ASSERT
(
svm
)
49
ASSERT
(
svm
->
get_classifier_type
() ==
CT_SVRLIGHT
)
50
ASSERT
(
interleaved_optimization
)
51
}
SHOGUN
Machine Learning Toolbox - Documentation