SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
FeatureBlockLogisticRegression.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 FEATUREBLOCKLOGISTICREGRESSION_H_
11 #define FEATUREBLOCKLOGISTICREGRESSION_H_
12 
13 #include <shogun/lib/config.h>
14 #ifdef USE_GPL_SHOGUN
17 
18 namespace shogun
19 {
33 class CFeatureBlockLogisticRegression : public CLinearMachine
34 {
35 
36  public:
38 
39 
40  CFeatureBlockLogisticRegression();
41 
49  CFeatureBlockLogisticRegression(
50  float64_t z, CDotFeatures* training_data,
51  CBinaryLabels* training_labels, CIndexBlockRelation* task_relation);
52 
54  virtual ~CFeatureBlockLogisticRegression();
55 
57  virtual const char* get_name() const
58  {
59  return "FeatureBlockLogisticRegression";
60  }
61 
65  CIndexBlockRelation* get_feature_relation() const;
66 
70  void set_feature_relation(CIndexBlockRelation* feature_relation);
71 
72  virtual float64_t apply_one(int32_t vec_idx);
73 
75  int32_t get_max_iter() const;
77  float64_t get_q() const;
79  int32_t get_regularization() const;
81  int32_t get_termination() const;
83  float64_t get_tolerance() const;
85  float64_t get_z() const;
86 
88  void set_max_iter(int32_t max_iter);
90  void set_q(float64_t q);
92  void set_regularization(int32_t regularization);
94  void set_termination(int32_t termination);
96  void set_tolerance(float64_t tolerance);
98  void set_z(float64_t z);
99 
100  protected:
101 
102  virtual SGVector<float64_t> apply_get_outputs(CFeatures* data);
103 
105  virtual bool train_machine(CFeatures* data=NULL);
106 
107  private:
108 
110  void register_parameters();
111 
113  void init();
114 
115  protected:
116 
118  CIndexBlockRelation* m_feature_relation;
119 
121  int32_t m_regularization;
122 
124  int32_t m_termination;
125 
127  int32_t m_max_iter;
128 
130  float64_t m_tolerance;
131 
133  float64_t m_q;
134 
136  float64_t m_z;
137 
138 };
139 }
140 #endif //USE_GPL_SHOGUN
141 #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