Difference between revisions of "Add Initial Design"

From SUMOwiki
Jump to navigationJump to search
 
Line 1: Line 1:
 
The toolbox comes with a number of sample selection algorithms, both for experimental design (initial samples) and sequential design.  Of course you are free to add your own.
 
The toolbox comes with a number of sample selection algorithms, both for experimental design (initial samples) and sequential design.  Of course you are free to add your own.
  
The available initial designs can be found in the folder src/matlab/initialDesigns.  Adding a new type means creating a new class in this folder analogous to the existing ones (subclass InitialDesign).  Two files are required:
+
The available initial designs can be found in the folder src/matlab/initialDesigns.  Adding a new type means creating a new class in this folder analogous to the existing ones (subclass InitialDesign).  Two methods are required:
  
* a constructor for reading in the configuration extracted from the XML file
+
* a constructor for reading in the configuration extracted from the XML file. Don't forget to call the constructor of the base class using the following syntax:
* a generate.m file that returns an initial set of data points according to some algorithm
+
 
 +
[code]
 +
this = this@InitialDesign(config);
 +
[/code]
 +
 
 +
* a generate.m file that returns two matrices:
 +
 
 +
** A set of initial samples (input values only) to be evaluated. To easily support different ranges for variables, each sample has to be in a fixed [-1,1] range in each dimension. The samples are later automatically transformed to their original range before they are passed to the sample evaluator.
 +
 
 +
** An optional set of evaluated samples (inputs and outputs), which may come from any source (for example: a dataset). These samples are instantly fed to the toolbox for modelling, because they don't have to be evaluated anymore. Because of this property, they have to be in the original range defined in the simulator xml file, instead of the fixed [-1,1] range.

Revision as of 10:49, 16 January 2009

The toolbox comes with a number of sample selection algorithms, both for experimental design (initial samples) and sequential design. Of course you are free to add your own.

The available initial designs can be found in the folder src/matlab/initialDesigns. Adding a new type means creating a new class in this folder analogous to the existing ones (subclass InitialDesign). Two methods are required:

  • a constructor for reading in the configuration extracted from the XML file. Don't forget to call the constructor of the base class using the following syntax:

[code] this = this@InitialDesign(config); [/code]

  • a generate.m file that returns two matrices:
    • A set of initial samples (input values only) to be evaluated. To easily support different ranges for variables, each sample has to be in a fixed [-1,1] range in each dimension. The samples are later automatically transformed to their original range before they are passed to the sample evaluator.
    • An optional set of evaluated samples (inputs and outputs), which may come from any source (for example: a dataset). These samples are instantly fed to the toolbox for modelling, because they don't have to be evaluated anymore. Because of this property, they have to be in the original range defined in the simulator xml file, instead of the fixed [-1,1] range.