SHOGUN
v3.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
modelselection
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
#ifndef CGRADIENTMODELSELECTION_H_
12
#define CGRADIENTMODELSELECTION_H_
13
14
#include <
shogun/lib/config.h
>
15
16
#ifdef HAVE_NLOPT
17
18
#include <
shogun/modelselection/ModelSelection.h
>
19
#include <
shogun/modelselection/ParameterCombination.h
>
20
21
namespace
shogun
22
{
23
27
class
CGradientModelSelection
:
public
CModelSelection
28
{
29
public
:
31
CGradientModelSelection
();
32
41
CGradientModelSelection
(
CMachineEvaluation
* machine_eval,
42
CModelSelectionParameters
* model_parameters=NULL);
43
44
virtual
~CGradientModelSelection
();
45
52
virtual
CParameterCombination
*
select_model
(
bool
print_state=
false
);
53
58
virtual
const
char
*
get_name
()
const
{
return
"GradientModelSelection"
; }
59
64
void
set_max_evaluations
(uint32_t max_evaluations)
65
{
66
m_max_evaluations
=max_evaluations;
67
}
68
73
uint32_t
get_max_evaluations
()
const
{
return
m_max_evaluations
; }
74
80
void
set_grad_tolerance
(
float64_t
grad_tolerance)
81
{
82
m_grad_tolerance
=grad_tolerance;
83
}
84
90
float64_t
get_grad_tolerance
()
const
{
return
m_grad_tolerance
; }
91
92
private
:
94
void
init();
95
96
protected
:
98
uint32_t
m_max_evaluations
;
99
101
float64_t
m_grad_tolerance
;
102
};
103
}
104
#endif
/* HAVE_NLOPT */
105
#endif
/* CGRADIENTMODELSELECTION_H_ */
SHOGUN
Machine Learning Toolbox - Documentation