SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GradientModelSelection.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) 2013 Roman Votyakov
8  * Copyright (C) 2012 Jacob Walker
9  */
10 
11 
12 #ifndef CGRADIENTMODELSELECTION_H_
13 #define CGRADIENTMODELSELECTION_H_
14 
15 #include <shogun/lib/config.h>
16 #ifdef USE_GPL_SHOGUN
17 
18 #ifdef HAVE_NLOPT
19 
22 
23 namespace shogun
24 {
25 
29 class CGradientModelSelection : public CModelSelection
30 {
31 public:
33  CGradientModelSelection();
34 
43  CGradientModelSelection(CMachineEvaluation* machine_eval,
44  CModelSelectionParameters* model_parameters=NULL);
45 
46  virtual ~CGradientModelSelection();
47 
54  virtual CParameterCombination* select_model(bool print_state=false);
55 
60  virtual const char* get_name() const { return "GradientModelSelection"; }
61 
66  void set_max_evaluations(uint32_t max_evaluations)
67  {
68  m_max_evaluations=max_evaluations;
69  }
70 
75  uint32_t get_max_evaluations() const { return m_max_evaluations; }
76 
82  void set_grad_tolerance(float64_t grad_tolerance)
83  {
84  m_grad_tolerance=grad_tolerance;
85  }
86 
92  float64_t get_grad_tolerance() const { return m_grad_tolerance; }
93 
94 private:
96  void init();
97 
98 protected:
100  uint32_t m_max_evaluations;
101 
103  float64_t m_grad_tolerance;
104 };
105 }
106 #endif /* HAVE_NLOPT */
107 #endif //USE_GPL_SHOGUN
108 #endif /* CGRADIENTMODELSELECTION_H_ */
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