Difference between revisions of "Add Sampling Algorithm"

From SUMOwiki
 
Line 3: Line 3:
 
You can govern how new samples are selected by implementing your own sample selector class that derives from the SampleSelector base class in src/matlab/sampleSelectors. Again, only two methods are needed:
 
You can govern how new samples are selected by implementing your own sample selector class that derives from the SampleSelector base class in src/matlab/sampleSelectors. Again, only two methods are needed:
   
* a constructor for reading in the configuration extracted from the XML file
+
* a constructor for reading in the configuration extracted from the XML file. See other sample selectors for the structure of this configuration.
* a selectSamples.m file that, given the toolbox state, returns the next batch of samples
+
* a selectSamples.m file that, given the toolbox state, returns the next batch of samples.
  +
  +
The toolbox state is a matlab struct with the following fields:
  +
* samples: the samples that were previously evaluated.
  +
* values: the output that must be used to select new samples for.
  +
* lastModels: the best models so far.
  +
* numNewSamples: the amount of new samples that must be selected. This is based on environmental information such as the modelling time, the number of available computational nodes (cpu cores, grid nodes) and so on.

Revision as of 12:23, 1 February 2008

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.

You can govern how new samples are selected by implementing your own sample selector class that derives from the SampleSelector base class in src/matlab/sampleSelectors. Again, only two methods are needed:

  • a constructor for reading in the configuration extracted from the XML file. See other sample selectors for the structure of this configuration.
  • a selectSamples.m file that, given the toolbox state, returns the next batch of samples.

The toolbox state is a matlab struct with the following fields:

  • samples: the samples that were previously evaluated.
  • values: the output that must be used to select new samples for.
  • lastModels: the best models so far.
  • numNewSamples: the amount of new samples that must be selected. This is based on environmental information such as the modelling time, the number of available computational nodes (cpu cores, grid nodes) and so on.