RandomSearchModelSelection.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Copyright (C) 2011 Heiko Strathmann
00008  * Copyright (C) 2012 Sergey Lisitsyn
00009  */
00010 
00011 #ifndef RANDOMSEARCHMODELSELECTION_H_
00012 #define RANDOMSEARCHMODELSELECTION_H_
00013 
00014 #include <shogun/modelselection/ModelSelection.h>
00015 #include <shogun/base/DynArray.h>
00016 
00017 namespace shogun
00018 {
00019 
00020 class CModelSelectionParameters;
00021 
00026 class CRandomSearchModelSelection: public CModelSelection
00027 {
00028 public:
00030     CRandomSearchModelSelection();
00031 
00037     CRandomSearchModelSelection(CModelSelectionParameters* model_parameters,
00038             CMachineEvaluation* machine_eval, float64_t ratio);
00039 
00041     virtual ~CRandomSearchModelSelection();
00042 
00044     float64_t get_ratio() const { return m_ratio; };
00046     void set_ratio(float64_t ratio) { REQUIRE(ratio>0.0 && ratio<1.0, "Ratio should be in ]0,1[ range"); m_ratio = ratio; };
00047 
00054     virtual CParameterCombination* select_model(bool print_state=false);
00055 
00057     virtual const char* get_name() const
00058     {
00059         return "RandomSearchModelSelection";
00060     }
00061 
00062 protected:
00064     float64_t m_ratio;
00065 
00066 };
00067 
00068 }
00069 
00070 #endif /* RANDOMSEARCHMODELSELECTION_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation