SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 {
33  REQUIRE(m_labels, "Labels not set.\n");
34  REQUIRE(m_labels->get_num_labels(), "Number of labels is zero.\n");
35  REQUIRE(m_labels->get_label_type() == LT_BINARY, "Labels must be binary.\n");
36 }

SHOGUN Machine Learning Toolbox - Documentation