SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MultitaskLeastSquaresRegression.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  * Copyright (C) 2012 Sergey Lisitsyn
8  */
9 
10 #ifndef MULTITASKLSREGRESSION_H_
11 #define MULTITASKLSREGRESSION_H_
12 
13 #include <shogun/lib/config.h>
14 #ifdef USE_GPL_SHOGUN
15 
18 
19 namespace shogun
20 {
29 class CMultitaskLeastSquaresRegression : public CMultitaskLinearMachine
30 {
31 
32  public:
35 
36 
37  CMultitaskLeastSquaresRegression();
38 
46  CMultitaskLeastSquaresRegression(
47  float64_t z, CDotFeatures* training_data,
48  CRegressionLabels* training_labels, CTaskRelation* task_relation);
49 
51  virtual ~CMultitaskLeastSquaresRegression();
52 
54  virtual const char* get_name() const
55  {
56  return "MultitaskLeastSquaresRegression";
57  }
58 
60  int32_t get_max_iter() const;
62  float64_t get_q() const;
64  int32_t get_regularization() const;
66  int32_t get_termination() const;
68  float64_t get_tolerance() const;
70  float64_t get_z() const;
71 
73  void set_max_iter(int32_t max_iter);
75  void set_q(float64_t q);
77  void set_regularization(int32_t regularization);
79  void set_termination(int32_t termination);
81  void set_tolerance(float64_t tolerance);
83  void set_z(float64_t z);
84 
86  virtual float64_t apply_one(int32_t i);
87 
88  protected:
89 
91  virtual bool train_machine(CFeatures* data=NULL);
92 
94  virtual bool train_locked_implementation(SGVector<index_t>* tasks);
95 
96  private:
97 
99  void register_parameters();
100 
102  void initialize_parameters();
103 
104  protected:
105 
107  int32_t m_regularization;
108 
110  int32_t m_termination;
111 
113  int32_t m_max_iter;
114 
116  float64_t m_tolerance;
117 
119  float64_t m_q;
120 
122  float64_t m_z;
123 
124 };
125 }
126 #endif //USE_GPL_SHOGUN
127 #endif
#define MACHINE_PROBLEM_TYPE(PT)
Definition: Machine.h:120
double float64_t
Definition: common.h:50
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18

SHOGUN Machine Learning Toolbox - Documentation