SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
GradientModelSelection.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  * Written (W) 2013 Roman Votyakov
00008  * Copyright (C) 2012 Jacob Walker
00009  */
00010 
00011 #ifndef CGRADIENTMODELSELECTION_H_
00012 #define CGRADIENTMODELSELECTION_H_
00013 
00014 #include <shogun/lib/config.h>
00015 
00016 #ifdef HAVE_NLOPT
00017 
00018 #include <shogun/modelselection/ModelSelection.h>
00019 #include <shogun/modelselection/ParameterCombination.h>
00020 
00021 namespace shogun
00022 {
00023 
00027 class CGradientModelSelection : public CModelSelection
00028 {
00029 public:
00031     CGradientModelSelection();
00032 
00041     CGradientModelSelection(CMachineEvaluation* machine_eval,
00042             CModelSelectionParameters* model_parameters=NULL);
00043 
00044     virtual ~CGradientModelSelection();
00045 
00052     virtual CParameterCombination* select_model(bool print_state=false);
00053 
00058     virtual const char* get_name() const { return "GradientModelSelection"; }
00059 
00064     void set_max_evaluations(uint32_t max_evaluations)
00065     {
00066         m_max_evaluations=max_evaluations;
00067     }
00068 
00073     uint32_t get_max_evaluations() const { return m_max_evaluations; }
00074 
00080     void set_grad_tolerance(float64_t grad_tolerance)
00081     {
00082         m_grad_tolerance=grad_tolerance;
00083     }
00084 
00090     float64_t get_grad_tolerance() const { return m_grad_tolerance; }
00091 
00092 private:
00094     void init();
00095 
00096 protected:
00098     uint32_t m_max_evaluations;
00099 
00101     float64_t m_grad_tolerance;
00102 };
00103 }
00104 #endif /* HAVE_NLOPT */
00105 #endif /* CGRADIENTMODELSELECTION_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation