Difference between revisions of "Add Measure"
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | In order for a modeling algorithm to work some kind of [[Measures|measure]] is needed that scores models and guides the search towards a good local optimum. A model can be scored in many different ways: using a separate validation set, simply the error in the fitted samples, cross validation, minimum description length (MDL), etc. | + | Before starting ensure you are familiar with [[OO_Programming_in_Matlab]]. |
+ | |||
+ | |||
+ | In order for a [[Add_Modeling_Algorithm | modeling algorithm]] to work some kind of [[Measures|measure]] is needed that scores models and guides the search towards a good local optimum of the model parameter space (NOT of the simulator!!). A model can be scored in many different ways: using a separate validation set, simply the error in the fitted samples, cross validation, minimum description length (MDL), etc. | ||
You are free to implement your own [[Measures|measures]] and add them to the toolbox. For example, this could be useful if you want to enforce a problem specific property. Say you are modeling a passive electronic component and you want to ensure the model retains passivity. This can be done by implementing a custom measure that performs the necessary checks. | You are free to implement your own [[Measures|measures]] and add them to the toolbox. For example, this could be useful if you want to enforce a problem specific property. Say you are modeling a passive electronic component and you want to ensure the model retains passivity. This can be done by implementing a custom measure that performs the necessary checks. | ||
− | + | To implement a new measure we suggest the following: | |
− | * a constructor to read out the configuration | + | |
− | * a calculateMeasure method that, given a model, returns a positive score where a lower score indicates a better model | + | * Go to the src/matlab/measures subdirectory and take a look at the most simple measure: SampleError |
+ | * Make a copy of the SampleError directory and give it the same of your Measure | ||
+ | * You should subclass Measure and ensure two methods are provided: | ||
+ | ** a constructor to read out the configuration information (if any) and construct the object | ||
+ | ** a calculateMeasure method that, given a model, returns a positive score where a lower score indicates a better model |
Latest revision as of 19:57, 29 September 2009
Before starting ensure you are familiar with OO_Programming_in_Matlab.
In order for a modeling algorithm to work some kind of measure is needed that scores models and guides the search towards a good local optimum of the model parameter space (NOT of the simulator!!). A model can be scored in many different ways: using a separate validation set, simply the error in the fitted samples, cross validation, minimum description length (MDL), etc.
You are free to implement your own measures and add them to the toolbox. For example, this could be useful if you want to enforce a problem specific property. Say you are modeling a passive electronic component and you want to ensure the model retains passivity. This can be done by implementing a custom measure that performs the necessary checks.
To implement a new measure we suggest the following:
- Go to the src/matlab/measures subdirectory and take a look at the most simple measure: SampleError
- Make a copy of the SampleError directory and give it the same of your Measure
- You should subclass Measure and ensure two methods are provided:
- a constructor to read out the configuration information (if any) and construct the object
- a calculateMeasure method that, given a model, returns a positive score where a lower score indicates a better model