00001 #include "regression/svr/MKLRegression.h" 00002 #include "regression/svr/LibSVR.h" 00003 00004 00005 using namespace shogun; 00006 00007 CMKLRegression::CMKLRegression(CSVM* s) : CMKL(s) 00008 { 00009 if (!s) 00010 { 00011 00012 if (!s) 00013 s=new CLibSVR(); 00014 set_svm(s); 00015 } 00016 } 00017 00018 CMKLRegression::~CMKLRegression() 00019 { 00020 } 00021 00022 float64_t CMKLRegression::compute_sum_alpha() 00023 { 00024 SG_NOTIMPLEMENTED; 00025 return 0; 00026 00027 // not correct needs explicit access to alpha and alpha* 00028 //float64_t suma=0; 00029 //int32_t nsv=svm->get_num_support_vectors(); 00030 //for (int32_t i=0; i<nsv; i++) 00031 // suma+=CMath::abs(svm->get_alpha(i))*tube_epsilon-svm->get_alpha(i); 00032 //return suma; 00033 } 00034 00035 float64_t CMKLRegression::compute_mkl_dual_objective() 00036 { 00037 SG_NOTIMPLEMENTED; 00038 return 0; 00039 } 00040 00041 void CMKLRegression::init_training() 00042 { 00043 ASSERT(labels && labels->get_num_labels()); 00044 ASSERT(svm); 00045 ASSERT(svm->get_classifier_type() == CT_SVRLIGHT); 00046 ASSERT(interleaved_optimization); 00047 }