Public Member Functions | Static Public Member Functions | Friends

CParameterCombination Class Reference

Detailed Description

class that holds ONE combination of parameters for a learning machine. The structure is organized as a tree. Every node may hold a name or an instance of a Parameter class. Nodes may have children. The nodes are organized in such way, that every parameter of a model for model selection has one node and sub-parameters are stored in sub-nodes. Using a tree of this class, parameters of models may easily be set. There are these types of nodes:

-root node: no name and no Parameter instance, every tree has such a node as root. Has children.

-Parameter node: a node with no name and an instance of Parameter, filled with one or more values. There may be different elements in these Parameter instances. Parameter nodes may have children with sub-parameters.

Again: Leafs of the tree may only be Parameter nodes.

Definition at line 42 of file ParameterCombination.h.

Inheritance diagram for CParameterCombination:
Inheritance graph

List of all members.

Public Member Functions

 CParameterCombination ()
void print_tree (int prefix_num=0) const
 CParameterCombination (Parameter *param)
virtual ~CParameterCombination ()
void apply_to_modsel_parameter (Parameter *parameter) const
void apply_to_machine (CMachine *machine) const
void append_child (CParameterCombination *child)
CParameterCombinationcopy_tree () const
bool has_children () const
virtual const char * get_name () const

Static Public Member Functions

static CDynamicObjectArray
< CParameterCombination > * 
leaf_sets_multiplication (const CDynamicObjectArray< CDynamicObjectArray< CParameterCombination > > &sets, const CParameterCombination *new_root)
static DynArray< Parameter * > * parameter_set_multiplication (const DynArray< Parameter * > &set_1, const DynArray< Parameter * > &set_2)


class CModelSelectionParameters

Constructor & Destructor Documentation

constructor for a root node

Definition at line 17 of file ParameterCombination.cpp.

CParameterCombination ( Parameter param  ) 

constructor for a Parameter node

Definition at line 22 of file ParameterCombination.cpp.

~CParameterCombination (  )  [virtual]

destructor also recursively destroys complete tree (SG_UNREF of child nodes)

Definition at line 39 of file ParameterCombination.cpp.

Member Function Documentation

void append_child ( CParameterCombination child  ) 

appends a child to this node

child child to append

Definition at line 45 of file ParameterCombination.cpp.

void apply_to_machine ( CMachine machine  )  const

applies this parameter tree to a learning machine (wrapper for apply_to_modesel_parameter() method)

machine learning machine to apply parameter tree to

Definition at line 275 of file ParameterCombination.cpp.

void apply_to_modsel_parameter ( Parameter parameter  )  const

applies this parameter tree to a parameter instance Recursively iterates over all children of the tree and sets model selection parameters of children to sub-parameters

parameter Parameter instance to apply parameter tree to

Definition at line 280 of file ParameterCombination.cpp.

CParameterCombination * copy_tree (  )  const

Copies the complete tree of this node. Note that nodes are actually copied. If this is a parameter node, a NEW Parameter instance to the same data is created in the copy

copy of the tree with this node as root as described above

Definition at line 250 of file ParameterCombination.cpp.

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

Implements CSGObject.

Definition at line 131 of file ParameterCombination.h.

bool has_children (  )  const

checks whether this node has children

true if node has children

Definition at line 114 of file ParameterCombination.h.

CDynamicObjectArray< CParameterCombination > * leaf_sets_multiplication ( const CDynamicObjectArray< CDynamicObjectArray< CParameterCombination > > &  sets,
const CParameterCombination new_root 
) [static]

Takes a set of sets of leafs nodes (!) and produces a set of instances of this class that contain every combination of the parameters in the leaf nodes in their Parameter variables. All combinations are put into a newly created tree. The root of this tree will be a copy of a specified node

created Parameter instances are added to the result set.

sets Set of sets of leafs to combine
new_root root node that is copied and put as root into all result trees
result set of tree combinations

Definition at line 129 of file ParameterCombination.cpp.

DynArray< Parameter * > * parameter_set_multiplication ( const DynArray< Parameter * > &  set_1,
const DynArray< Parameter * > &  set_2 
) [static]

Returns a newly created array with pointers to newly created Parameter instances, which contain all combinations of the provided Parameters.

set_1 array of Parameter instances
set_2 array of Parameter instances
result array with all combinations

Definition at line 110 of file ParameterCombination.cpp.

void print_tree ( int  prefix_num = 0  )  const

Prints a representation of the current node

prefix_num number of tabs that will be prefixed for every output. At each recursion level, one is added.

Definition at line 50 of file ParameterCombination.cpp.

Friends And Related Function Documentation

friend class CModelSelectionParameters [friend]

Definition at line 45 of file ParameterCombination.h.

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