SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MultitaskLogisticRegression.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 MULTITASKLOGISTICREGRESSION_H_
11 #define MULTITASKLOGISTICREGRESSION_H_
12 
13 #include <shogun/lib/config.h>
19 
20 #include <vector>
21 #include <set>
22 
23 using namespace std;
24 
25 namespace shogun
26 {
36 {
37 
38  public:
41 
42 
44 
53  float64_t z, CDotFeatures* training_data,
54  CBinaryLabels* training_labels, CTaskRelation* task_relation);
55 
58 
60  virtual const char* get_name() const
61  {
62  return "MultitaskLogisticRegression";
63  }
64 
66  int32_t get_max_iter() const;
68  float64_t get_q() const;
70  int32_t get_regularization() const;
72  int32_t get_termination() const;
74  float64_t get_tolerance() const;
76  float64_t get_z() const;
77 
79  void set_max_iter(int32_t max_iter);
81  void set_q(float64_t q);
83  void set_regularization(int32_t regularization);
85  void set_termination(int32_t termination);
87  void set_tolerance(float64_t tolerance);
89  void set_z(float64_t z);
90 
92  virtual float64_t apply_one(int32_t i);
93 
94  protected:
95 
97  virtual bool train_machine(CFeatures* data=NULL);
98 
100  virtual bool train_locked_implementation(SGVector<index_t>* tasks);
101 
102  private:
103 
105  void register_parameters();
106 
108  void initialize_parameters();
109 
110  protected:
111 
114 
116  int32_t m_termination;
117 
119  int32_t m_max_iter;
120 
123 
126 
129 
130 };
131 }
132 #endif

SHOGUN Machine Learning Toolbox - Documentation