问题
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.
回答1:
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.
回答2:
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.
回答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.
回答4:
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
回答5:
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.
回答6:
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.
回答7:
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
来源:https://stackoverflow.com/questions/623660/a-good-uncertainty-interval-arithmetic-library