SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RandomSearchModelSelection.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) 2011 Heiko Strathmann
8  * Copyright (C) 2012 Sergey Lisitsyn
9  */
10 
11 #ifndef RANDOMSEARCHMODELSELECTION_H_
12 #define RANDOMSEARCHMODELSELECTION_H_
13 
14 #include <shogun/lib/config.h>
15 
17 #include <shogun/base/DynArray.h>
18 
19 namespace shogun
20 {
21 class CModelSelectionParameters;
22 
27 {
28 public:
31 
39  CModelSelectionParameters* model_parameters, float64_t ratio);
40 
43 
48  float64_t get_ratio() const { return m_ratio; }
49 
54  void set_ratio(float64_t ratio)
55  {
56  REQUIRE(ratio>0.0 && ratio<1.0, "Ratio should be in [0,1] range\n")
57  m_ratio=ratio;
58  }
59 
66  virtual CParameterCombination* select_model(bool print_state=false);
67 
69  virtual const char* get_name() const { return "RandomSearchModelSelection"; }
70 
71 protected:
74 };
75 }
76 #endif /* RANDOMSEARCHMODELSELECTION_H_ */

SHOGUN Machine Learning Toolbox - Documentation