SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
MultitaskLogisticRegression.h
浏览该文件的文档.
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 
21 using namespace std;
22 
23 namespace shogun
24 {
34 {
35 
36  public:
39 
40 
42 
51  float64_t z, CDotFeatures* training_data,
52  CBinaryLabels* training_labels, CTaskRelation* task_relation);
53 
56 
58  virtual const char* get_name() const
59  {
60  return "MultitaskLogisticRegression";
61  }
62 
64  int32_t get_max_iter() const;
66  float64_t get_q() const;
68  int32_t get_regularization() const;
70  int32_t get_termination() const;
72  float64_t get_tolerance() const;
74  float64_t get_z() const;
75 
77  void set_max_iter(int32_t max_iter);
79  void set_q(float64_t q);
81  void set_regularization(int32_t regularization);
83  void set_termination(int32_t termination);
85  void set_tolerance(float64_t tolerance);
87  void set_z(float64_t z);
88 
90  virtual float64_t apply_one(int32_t i);
91 
92  protected:
93 
95  virtual bool train_machine(CFeatures* data=NULL);
96 
98  virtual bool train_locked_implementation(SGVector<index_t>* tasks);
99 
100  private:
101 
103  void register_parameters();
104 
106  void initialize_parameters();
107 
108  protected:
109 
112 
114  int32_t m_termination;
115 
117  int32_t m_max_iter;
118 
121 
124 
127 
128 };
129 }
130 #endif
Features that support dot products among other operations.
Definition: DotFeatures.h:44
class Multitask Logistic Regression used to solve classification problems with a few tasks related vi...
#define MACHINE_PROBLEM_TYPE(PT)
Definition: Machine.h:120
double float64_t
Definition: common.h:50
class MultitaskLinearMachine, a base class for linear multitask classifiers
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
Binary Labels for binary classification.
Definition: BinaryLabels.h:37
used to represent tasks in multitask learning
Definition: TaskRelation.h:31

SHOGUN 机器学习工具包 - 项目文档