The SUMO toolbox  2018a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
Measure Class Reference

Abstract base class for a measure. More...

Inheritance diagram for Measure:
Inheritance graph
[legend]

Public Member Functions

function Measure (var ip, var varargin)
 Class constructor. More...
 
function setErrorFcn (var efun)
 Sets the error function to use. More...
 
function getErrorFcn ()
 Returns the used error function. More...
 
function getFinalTarget ()
 Returns the target (goal) accuracy. More...
 
function getParallelMode ()
 Returns whether we are using parallel computing. More...
 
function getWeight ()
 Returns vector of weights. More...
 
function isEnabled ()
 Returns whether this measures is being used. More...
 
function getTarget ()
 Returns the target (goal) accuracy. More...
 
function processMeasure (var model, var context, var outputIndex)
 Wrapper that calls calculateMeasure. More...
 
function calculateMeasure (var model, var context, var outputIndex)
 Calculates the measure. More...
 

Detailed Description

Abstract base class for a measure.

Handles some of the configuration valid for all measures, such as the error function and the target

Constructor & Destructor Documentation

function Measure ( var  ip,
var  varargin 
)
inline

Class constructor.

Returns
instance of class
Note
IT IS IMPORTANT THAT THE DEFAULT TARGET IS 0 !! SINCE OTHERWISE TARGETS MAY BE REACHED TOO SOON (e.g., MinMax gives score of 0 but target is 0.01, see

Member Function Documentation

function calculateMeasure ( var  model,
var  context,
var  outputIndex 
)

Calculates the measure.

Parameters
modelsurrogate model
contextstruct of contextual information (optional)
outputIndexfor which output to calculate the measure
Return values
newModelupdated surrogate model (may happen in some measures)
scorescore of the surrogate model
function getErrorFcn ( )
inline

Returns the used error function.

function getFinalTarget ( )
inline

Returns the target (goal) accuracy.

function getParallelMode ( )
inline

Returns whether we are using parallel computing.

function getTarget ( )
inline

Returns the target (goal) accuracy.

function getWeight ( )
inline

Returns vector of weights.

function isEnabled ( )
inline

Returns whether this measures is being used.

function processMeasure ( var  model,
var  context,
var  outputIndex 
)

Wrapper that calls calculateMeasure.

This function calls calculateMeasure and replaces NaN/Inf Values.

Parameters
modelsurrogate model
contextstruct of contextual information (optional)
outputIndexfor which output to calculate the measure
Return values
scorescore of the surrogate model
function setErrorFcn ( var  efun)
inline

Sets the error function to use.


The documentation for this class was generated from the following files: