SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MKLClassification.cpp
Go to the documentation of this file.
2 
4 
5 using namespace shogun;
6 
8 {
9  if (!s)
10  {
11 
12  if (!s)
13  s=new CLibSVM();
14  set_svm(s);
15  }
16 }
17 
19 {
20 }
22 {
23  float64_t suma=0;
24  int32_t nsv=svm->get_num_support_vectors();
25  for (int32_t i=0; i<nsv; i++)
26  suma+=CMath::abs(svm->get_alpha(i));
27 
28  return suma;
29 }
30 
32 {
34 }
int32_t get_num_support_vectors()
LibSVM.
Definition: LibSVM.h:28
int32_t get_num_labels()
Definition: Labels.cpp:240
CSVM * svm
Definition: MKL.h:449
CLabels * labels
Definition: Machine.h:251
#define ASSERT(x)
Definition: SGIO.h:102
double float64_t
Definition: common.h:56
float64_t get_alpha(int32_t idx)
Multiple Kernel Learning.
Definition: MKL.h:93
void set_svm(CSVM *s)
Definition: MKL.h:119
bool is_two_class_labeling()
Definition: Labels.cpp:89
A generic Support Vector Machine Interface.
Definition: SVM.h:46
virtual float64_t compute_sum_alpha()
static T abs(T a)
return the absolute value of a number
Definition: Math.h:181

SHOGUN Machine Learning Toolbox - Documentation