Public Member Functions

CModelSelectionParameters Class Reference

Detailed Description

Class to select parameters and their ranges for model selection. The structure is organized as a tree with different kinds of nodes, depending on the values of its member variables of name and CSGObject.

-root node: no name and no CSGObject, may have children

-CSGObject node: has name and a CSGObject, may have children which are the parameters of the CSGObject. CSGObjects are SG_REF'ed/SG_UNREF'ed

-value node: a node with a (parameter) name and an array of values for that parameter. These ranges may be set using build_values(). This node is always a leaf.

After a (legal!) tree is constructed with the append_child method, all possible combinations that are implied by this tree may be extracted with the get_combinations method. It generates a set of trees (different kind than this one) that contain the instantiated parameter combinations.

Definition at line 60 of file ModelSelectionParameters.h.

Inheritance diagram for CModelSelectionParameters:
Inheritance graph

List of all members.

Public Member Functions

 CModelSelectionParameters ()
 CModelSelectionParameters (const char *node_name)

name of the parameter of the CSGObject

constructor for a CSGObject node

sgobject the CSGObject for this node. Is SG_REF'ed

 CModelSelectionParameters (const char *node_name, CSGObject *sgobject)
 ~CModelSelectionParameters ()
void append_child (CModelSelectionParameters *child)
template<class T >
void set_values (SGVector< T > values)
void print_tree (int prefix_num=0)
< CParameterCombination > * 
get_combinations ()
void build_values (float64_t min, float64_t max, ERangeType type, float64_t step=1.0, float64_t type_base=2.0)
void build_values (int32_t min, int32_t max, ERangeType type, int32_t step=1, int32_t type_base=2)
virtual const char * get_name () const
bool has_children () const

Constructor & Destructor Documentation

constructor for a root node

Definition at line 19 of file ModelSelectionParameters.cpp.

CModelSelectionParameters ( const char *  node_name  ) 

constructor for a value node

node_name name of the parameter the values will belong to

Definition at line 24 of file ModelSelectionParameters.cpp.

CModelSelectionParameters ( const char *  node_name,
CSGObject sgobject 

Definition at line 31 of file ModelSelectionParameters.cpp.

destructor. If set, deletes data array and SG_UNREF's the CSGObject

Definition at line 58 of file ModelSelectionParameters.cpp.

Member Function Documentation

void append_child ( CModelSelectionParameters child  ) 

appends a child to this tree. only possible if this is no value node

child child to append

Definition at line 66 of file ModelSelectionParameters.cpp.

void build_values ( float64_t  min,
float64_t  max,
ERangeType  type,
float64_t  step = 1.0,
float64_t  type_base = 2.0 

float64_t wrapper for build_values()

Definition at line 104 of file ModelSelectionParameters.cpp.

void build_values ( int32_t  min,
int32_t  max,
ERangeType  type,
int32_t  step = 1,
int32_t  type_base = 2 

int32_t wrapper for build_values()

Definition at line 111 of file ModelSelectionParameters.cpp.

CDynamicObjectArray< CParameterCombination > * get_combinations (  ) 

most important method. If the tree was regarding node types and structure, a set of trees which contain all combinations of parameters that are implied by this tree is generated.

result all trees of parameter combinations are put into here

Definition at line 167 of file ModelSelectionParameters.cpp.

virtual const char* get_name (  )  const [virtual]
name of the SGSerializable

Implements CSGObject.

Definition at line 122 of file ModelSelectionParameters.h.

bool has_children (  )  const [protected]

checks if this node has children

true if it has children

Definition at line 142 of file ModelSelectionParameters.h.

void print_tree ( int  prefix_num = 0  ) 

SG_PRINT's the tree of which this node is the base

prefix_num a number of tabs that is put before each output to have a more readable print layout

Definition at line 383 of file ModelSelectionParameters.cpp.

void set_values ( SGVector< T >  values  ) 

setter for values of this node. If the latter are not possible to be produced by set_range, a vector may be specified directly.

values value vector

Definition at line 97 of file ModelSelectionParameters.cpp.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation