MKLRegression.cpp

Go to the documentation of this file.
00001 #include <shogun/regression/svr/MKLRegression.h>
00002 #include <shogun/regression/svr/LibSVR.h>
00003 #ifdef USE_SVMLIGHT
00004 #include <shogun/regression/svr/SVRLight.h>
00005 #endif //USE_SVMLIGHT
00006 
00007 using namespace shogun;
00008 
00009 CMKLRegression::CMKLRegression(CSVM* s) : CMKL(s)
00010 {
00011     if (!s)
00012     {
00013 #ifdef USE_SVMLIGHT
00014         s=new CSVRLight();
00015 #endif //USE_SVMLIGHT
00016         if (!s)
00017             s=new CLibSVR();
00018         set_svm(s);
00019     }
00020 }
00021 
00022 CMKLRegression::~CMKLRegression()
00023 {
00024 }
00025 
00026 float64_t CMKLRegression::compute_sum_alpha()
00027 {
00028     SG_NOTIMPLEMENTED;
00029     return 0;
00030 
00031     // not correct needs explicit access to alpha and alpha*
00032     //float64_t suma=0;
00033     //int32_t nsv=svm->get_num_support_vectors();
00034     //for (int32_t i=0; i<nsv; i++)
00035     //  suma+=CMath::abs(svm->get_alpha(i))*tube_epsilon-svm->get_alpha(i);
00036     //return suma;
00037 }
00038 
00039 float64_t CMKLRegression::compute_mkl_dual_objective()
00040 {
00041     SG_NOTIMPLEMENTED;
00042     return 0;
00043 }
00044 
00045 void CMKLRegression::init_training()
00046 {
00047     ASSERT(m_labels && m_labels->get_num_labels());
00048     ASSERT(svm);
00049     ASSERT(svm->get_classifier_type() == CT_SVRLIGHT);
00050     ASSERT(interleaved_optimization);
00051 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation