ema workbench

Other Sub Sites


Created on 16 aug. 2011

This module contains various classes that can be used for specifying different types of uncertainties.

Code author: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>

class uncertainties.AbstractUncertainty(values, name)

AbstractUncertainty provides a template for specifying different types of uncertainties.

dist = None

a string denoting the type of distribution to be used in sampling


get values

name = None

the name of the uncertainty

type = None

the type of integer

values = None

the values that specify the uncertainty

class uncertainties.ParameterUncertainty(values, name, integer=False, default=None)

ParameterUncertainty is used for specifying parametric uncertainties. An uncertainty is parametric if the range is continuous from the lower bound to the upper bound.

Parametric uncertainties are either floats or integers.

default = None

optional attribute for specifying default value for uncertainty


return default value

class uncertainties.CategoricalUncertainty(values, name, default=None)

CategoricalUncertainty can can be used for sampling over categorical variables. The categories can be of any type, including Strings, Integers, Floats, Tuples, or any Object. As values the categories are specified in a collection.

Underneath, this is treated as a integer parametric uncertainty. That is, an integer parametric uncertainty is used with each integer corresponding to a particular category. This class called by the sampler to transform the integer back to the appropriate category.

categories = None

the categories of the uncertainty


transform a category to an integer


transform an integer to a category