SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
SVRLight.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 1999-2009 Soeren Sonnenburg
8  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef _SVRLight_H___
12 #define _SVRLight_H___
13 
14 #include <shogun/lib/config.h>
16 
17 #ifdef USE_SVMLIGHT
19 #endif //USE_SVMLIGHT
20 
21 #ifdef USE_SVMLIGHT
22 namespace shogun
23 {
62 class CSVRLight: public CSVMLight
63 {
64  public:
67 
69  CSVRLight();
70 
79 
81  virtual ~CSVRLight();
82 
88 
90  void svr_learn();
91 
102  float64_t *a, float64_t *lin, float64_t *c, float64_t* eps,
103  int32_t *label, int32_t totdoc);
104 
118  virtual void update_linear_component(
119  int32_t* docs, int32_t *label,
120  int32_t *active2dnum, float64_t *a, float64_t* a_old,
121  int32_t *working2dnum, int32_t totdoc,
122  float64_t *lin, float64_t *aicache, float64_t* c);
123 
137  virtual void update_linear_component_mkl(
138  int32_t* docs, int32_t *label,
139  int32_t *active2dnum, float64_t *a, float64_t* a_old,
140  int32_t *working2dnum, int32_t totdoc,
141  float64_t *lin, float64_t *aicache, float64_t* c);
142 
157  int32_t* docs, int32_t *label,
158  int32_t *active2dnum, float64_t *a, float64_t* a_old,
159  int32_t *working2dnum, int32_t totdoc,
160  float64_t *lin, float64_t *aicache, float64_t* c);
161 
169  void call_mkl_callback(float64_t* a, int32_t* label, float64_t* lin, float64_t* c, int32_t totdoc);
170 
185  virtual void reactivate_inactive_examples(
186  int32_t *label,float64_t *a,SHRINK_STATE *shrink_state,
187  float64_t *lin, float64_t *c, int32_t totdoc,int32_t iteration,
188  int32_t *inconsistent,
189  int32_t *docs,float64_t *aicache,
190  float64_t* maxdiff);
191 
193  virtual const char* get_name() const { return "SVRLight"; }
194 
195  protected:
200  static void* update_linear_component_linadd_helper(void *params);
201 
207  int32_t regression_fix_index(int32_t i);
208 
215  static int32_t regression_fix_index2(
216  int32_t i, int32_t num_vectors);
217 
224  virtual float64_t compute_kernel(int32_t i, int32_t j);
225 
234  virtual bool train_machine(CFeatures* data=NULL);
235 
237  int32_t num_vectors;
238 };
239 }
240 #endif //USE_SVMLIGHT
241 #endif
EMachineType
Definition: Machine.h:33
static int32_t regression_fix_index2(int32_t i, int32_t num_vectors)
Definition: SVRLight.cpp:381
int32_t regression_fix_index(int32_t i)
Definition: SVRLight.cpp:373
The class Labels models labels, i.e. class assignments of objects.
Definition: Labels.h:43
virtual const char * get_name() const
Definition: SVRLight.h:193
virtual void update_linear_component_mkl(int32_t *docs, int32_t *label, int32_t *active2dnum, float64_t *a, float64_t *a_old, int32_t *working2dnum, int32_t totdoc, float64_t *lin, float64_t *aicache, float64_t *c)
Definition: SVRLight.cpp:495
float64_t epsilon
Definition: SVM.h:251
virtual void update_linear_component_mkl_linadd(int32_t *docs, int32_t *label, int32_t *active2dnum, float64_t *a, float64_t *a_old, int32_t *working2dnum, int32_t totdoc, float64_t *lin, float64_t *aicache, float64_t *c)
Definition: SVRLight.cpp:568
virtual float64_t compute_objective_function(float64_t *a, float64_t *lin, float64_t *c, float64_t *eps, int32_t *label, int32_t totdoc)
Definition: SVRLight.cpp:337
virtual EMachineType get_classifier_type()
Definition: SVRLight.cpp:68
Class SVRLight, performs support vector regression using SVMLight.
Definition: SVRLight.h:62
virtual float64_t compute_kernel(int32_t i, int32_t j)
Definition: SVRLight.cpp:390
double float64_t
Definition: common.h:50
static void * update_linear_component_linadd_helper(void *params)
Definition: SVRLight.cpp:361
virtual bool train_machine(CFeatures *data=NULL)
Definition: SVRLight.cpp:73
virtual void update_linear_component(int32_t *docs, int32_t *label, int32_t *active2dnum, float64_t *a, float64_t *a_old, int32_t *working2dnum, int32_t totdoc, float64_t *lin, float64_t *aicache, float64_t *c)
Definition: SVRLight.cpp:397
MACHINE_PROBLEM_TYPE(PT_REGRESSION)
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The class Features is the base class of all feature objects.
Definition: Features.h:68
int32_t num_vectors
Definition: SVRLight.h:237
class SVMlight
Definition: SVMLight.h:225
void call_mkl_callback(float64_t *a, int32_t *label, float64_t *lin, float64_t *c, int32_t totdoc)
Definition: SVRLight.cpp:611
The Kernel base class.
Definition: Kernel.h:159
virtual void reactivate_inactive_examples(int32_t *label, float64_t *a, SHRINK_STATE *shrink_state, float64_t *lin, float64_t *c, int32_t totdoc, int32_t iteration, int32_t *inconsistent, int32_t *docs, float64_t *aicache, float64_t *maxdiff)
Definition: SVRLight.cpp:666
virtual ~CSVRLight()
Definition: SVRLight.cpp:64

SHOGUN Machine Learning Toolbox - Documentation