Outputs

From SUMOwiki
Jump to navigationJump to search

There are three levels on which you can configure the way the different outputs in the simulator file are modeller.

Default behaviour, all outputs modelled

If no Outputs tag is defined in the configuration file, all outputs are modelled and evaluated with the default CrossValidation measure and target accuracy 0.001. Complex outputs are split into a real and imaginary part, and are modeller separately.


Default behaviour, selected outputs modelled

To change this default behaviour, one must specify an Outputs tag in the Run configuration. If you just want to omit outputs and want to keep the default modelling behaviour of the toolbox (CrossValidation, 0.001 accuracy), you only have to add an Output subelement for each output that you want modelled.

An example of such a configuration for the Academic2DTwice test function is:


<Outputs>
	<Output name="out" />
	<Output name="outinverse" />
</Outputs>


Custom behaviour for each output

Component Customization

If you also want to change or fine-tune the behaviour of the toolbox for each output separately, you can add subelements to each Output tag to customize the toolbox for that particular output. This allows you to use different sample selectors for each output, change the default measure, or combine multiple measures.

Several examples of valid Output configurations can be found commented in default.xml.

Here is an example of an output configuration for the Academic2DTwice test function:

<Outputs>
	<Output name="out">
		<SampleSelector>gradient</SampleSelector>
		<Measure type="CrossValidation" target=".0001" use="on" />
	</Output>
	
	<Output name="outinverse">
		<SampleSelector>grid</SampleSelector>
		<Measure type="CrossValidation" target=".05" use="on" />
		<Measure type="MinMax" />
	</Output>
</Outputs>

This configuration models the first Output named "out" using the CrossValidation measure, but with increased target accuracy, and uses the gradient sample selector to select new samples. The second output, named "outinverse", uses CrossValidation in combination with the MinMax measure, and uses the grid sample selector to select new samples for this output. Like this, you can add multiple measures to one Output, so that each measure has something to say in deciding the accuracy of the models.

If an Output element does not contain any Measure elements, that output is modelled using the default configuration, which is the CrossValidation measure and target accuracy 0.001.

For more information on how multiple measures are handled and the configuration options of each measure, see Measures.


Complex handling

by default, a complex output is treated as such and is passed in its original form to all the components of the toolbox. However, some components, do not support complex numbers directly, and are therefore incompatible with the default setting.

The following components are at this moment incapable of handling complex outputs:

  • Model builders using neural networks (ann, annbatch, anngenetic, ...)

In order to get these components to work with complex outputs, the outputs will have to be pre-processed. This is done by changing the complexHandling attribute of the Output. There are 3 valid values for this attribute:

  1. 'complex': Complex outputs are treated as is. Will not work with components in the aforementioned list.
  2. 'real': Complex numbers are split in real and imaginary parts, and each part is modeller separately. This means that two models will be built, and the toolbox will have twice the work it would normally have. Also any correlation between the real and imaginary part is lost.
  3. 'modulus': The modulus of the complex number is modeller instead of the original number. Since the modulus is a real number, it can be modelled using all the components available.