A good uncertainty (interval) arithmetic library? [closed]
Asked Answered
S

7

6

edited

Given that the words "uncertain" and "uncertainty" are fairly ubiquitous, it's hard to Google "uncertainty arithmetic" and get anything immediately helpful. Thus, can anyone suggest a good library of routines, in almost any programming/scripting language, that implements handling of uncertain values, as per this description:

Use uncertainty arithmetic to record values that are approximations, for which there is a measured tolerance. This is when we are unsure about a value, but know the upper and lower bounds it can have, expressed as a ±value.

Secretariat answered 8/3, 2009 at 14:25 Comment(0)
C
6

I believe "Interval Arithmetic" is the more common name for what you're looking for. boost::interval would be my first choice for a supporting library.

Cephalic answered 8/3, 2009 at 16:32 Comment(0)
P
6

If you are looking for an error propagation module (this is different from interval arithmetic, but error propagation is what is commonly used by scientists), I would suggest that you have a look at my uncertainties Python module. It handles error/uncertainty propagation in a transparent way, and, contrary to many implementations, properly handles correlations between variables.

Piranha answered 23/9, 2009 at 13:27 Comment(0)
R
3

Have a look at Thomas Flanagan's Error Propagation Java class. The approach it uses is most excellent for handling uncertainty without excess trouble.

Rolland answered 8/3, 2009 at 15:57 Comment(0)
B
3

for reference, as it's probably way too late for you, I'd suggest BIAS/Profil: http://www.ti3.tuhh.de/keil/profil/index_e.html

Barny answered 13/11, 2013 at 15:57 Comment(2)
In this case, it's never too lateSecretariat
good then! its features in your case that I see as a user would be that BIAS is a C library, with some C++ features from Profil ; it accounts for computer numerical error ; if your errors are centered, direct access to nominal value ; vector of intervals for multidimensional analyses ; complete arithmetic included (usual operations with the spin of interval arithmetic on intervals, vectors, matrices) ; finally easy to get started with using the first pages of chapter3 of the documentation: a few warnings/informations, and tables of all operations for each type.Barny
N
1

It's not a library, but your question reminded me of an example in "Expert F#" that describes probabilistic workflows:

instead of writing expressions to compute, say, integers, we instead write expressions that compute distributions of integers. This case study is based on a paper by Ramsey and Pfeffer from 2002.

You can read the excerpt on google books.

Nymphomania answered 8/3, 2009 at 14:36 Comment(0)
K
1

I'd probably go about this by declaring a class called UncertainValue, with methods and properties such as (psuedocode):

class UncertainValue
{
  private double upperbound;
  private double lowerbound;
  private double nominalvalue;
  private double certainty;
  ...
  UncertainValue add(UncertainValue value);
  UncertainValue multiply(UncertainValue factor);
}

I realise this doesn't answer your question in terms of finding a pre-made library, sorry.

Kain answered 8/3, 2009 at 15:21 Comment(0)
C
0

INTLAB (INTerval LABoratory) is a well-known library for interval arithmetic and verified numerical linear algebra. It is based on MATLAB/Octave. You can download this library from here:

http://www.ti3.tu-harburg.de/rump/intlab/

kv library is an interval arithmetic library made by C++ and Boost C++ libraries. Multiple precision interval arithmetic is available. It also has a verified ODE solver.

http://verifiedby.me/kv/index-e.html

For other interval arithmetic libraries/software, check the following website:

http://www.cs.utep.edu/interval-comp/intsoft.html

Curculio answered 11/7, 2019 at 14:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.