SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
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_ */
virtual CParameterCombination * select_model(bool print_state=false)
#define REQUIRE(x,...)
Definition: SGIO.h:206
Class to select parameters and their ranges for model selection. The structure is organized as a tree...
Abstract base class for model selection.
double float64_t
Definition: common.h:50
Machine Evaluation is an abstract class that evaluates a machine according to some criterion...
Class that holds ONE combination of parameters for a learning machine. The structure is organized as ...
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
Model selection class which searches for the best model by a random search. See CModelSelection for d...

SHOGUN Machine Learning Toolbox - Documentation