Questions tagged [uncertainty]

The uncertainties package is a python package that transparently handles calculations with numbers with uncertainties (like 3.14±0.01). It can also yield the derivatives of any expression.

The uncertainties package is a python package that transparently handles calculations with numbers with uncertainties (like 3.14±0.01). It can also yield the derivatives of any expression.

Tag usage

Questions on tag should be about implementation and programming problems.
Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

138 questions
2
votes
1 answer

Report uncertainty: given a mean and the standard error, show only significant figures

The intent is to show the result of several observations without unnecessary digits i.e., to display a value with the number of significant digits that is consistent with a given uncertainty. For example, if computed mean=123.45 and err=0.0012345…
jfs
  • 399,953
  • 195
  • 994
  • 1,670
2
votes
0 answers

Incorporating uncertainty of pre-determined parameter into curve_fit operation

I have a model like y=A*x+N where N is a fixed parameter with uncertainty say N=1.0+/-0.1. I would like to curve fit this model to a data set in order to determine A but with an uncertainty value (calculated based on the uncertainty in the fixed…
2
votes
1 answer

Gaussian fit with consideration of uncertainties

I'm having trouble understandig what is wrong with the following piece of code: import numpy as np import matplotlib.pyplot as plt from scipy.odr import * def gauss(p,x): return p[0]*np.exp(-(x-p[1])**2/(2*p[2]**2)+p[4]) + p[3] # Create a…
2
votes
1 answer

Python fitting a curve with coeficents errors

I need to fit a curve over a set of data and also need the uncertainty - or errors - of the coefficients, for exemple: fitting ax^2+bx+c, i need the values: a+-da, b+-db and c+-dc. Where da,db and dc are the uncertaints. I already tried polyfit and…
2
votes
1 answer

Extract nominal and standard deviation from ufloat inside a panda dataframe

For convenience purpose I am using pandas dataframes in order to perform an uncertainty propagation on a large set on data. I then wish to plot the nominal value of my data set but something like myDF['colLabel'].n won't work. How to extract the…
Odyseus_v4
  • 195
  • 1
  • 11
2
votes
1 answer

Python: ufloat to float

I have calculated some ufloats using the uncertainties package, let's call them theta and gamma. Now, for my following calculations I don't need their errors (I am using them later as y-values in linear plot). I simply could calculate them ignoring…
julandi
  • 85
  • 8
2
votes
0 answers

Curve-fitting with uncertainties in fixed parameters of function to fit (Python)

I have a function that looks like f(x, m, E, I) = m * (x - x ** 2) / (E * I), where I want to get a value for E. I have some data, which I call X and Y, and some uncertainty in the y data which I call yerr. Additionally the parameters m and I are…
Vladimir Vargas
  • 1,744
  • 4
  • 24
  • 48
2
votes
2 answers

AI: Partial Unification in Open-World Reference Resolution

When performing reference resolution on predicates describing the semantics of dialogue expressions, I need to be able to allow for partial unification due to working in an open world. For example, consider the following scenario: There is a blue…
2
votes
4 answers

measuring uncertainty in matlabs svmclassify

I'm doing contextual object recognition and I need a prior for my observations. e.g. this space was labeled "dog", what's the probability that it was labeled correctly? Do you know if matlabs svmclassify has an argument to return this level of…
Mark
  • 409
  • 2
  • 6
  • 17
1
vote
1 answer

How do I plot my function to a mesh

I am a new MATLAB user and I am trying to plot a function: function [ uncertainty ] = uncertain(s1, s2, p) %UNCERTAIN calculates the measurement uncertainty of a triangulation % provide two coordinates of known stations and a target coordinate % of…
Ralf K.
  • 115
  • 1
  • 12
1
vote
1 answer

How to display the result of a calculation with ufloats more precisely than two digits past decimal point?

I'm rather new to python and ran into a problem working with uncertainties. Whenever I try to do a calculation with uncertainties using ufloats, the result is cut off after the second digit after decimal point, even if the ufloats put into the…
smtlscne
  • 13
  • 3
1
vote
0 answers

python uncertainties package give me wrong uncertainty

Im calulation uncertainties with the uncertainties Package in Python. But the package is making one starnge error. When I calculate my values in my code using print(ufloat(x,ux)) print(uflaot(y,uy)) print(ufloat(x,ux)/uflaot(y,uy)) x,y,ux,uy are…
1
vote
0 answers

Scipy ODR for multiple regression, where only 1 independent variable has uncertainty?

Is it possible to use orthogonal distance regression in a multiple regression fit where 1 of the independent variables is perfectly measured (i.e. has no uncertainty)? Here's an example of what I mean: y is a function of x_0 and x_1. Both y and x_1…
1
vote
1 answer

Writing {value} +- {uncertainty} in matrix. How does that work with sympy?

I have two 6x6 matrices. Here I'll just show the first two rows and columns: import sympy as sp values = sp.Matrix([[-0.403900000000000, 0.158730000000000], [-1.52350000000000, -1.87937000000000]]) uncertainties = sp.Matrix([[0.000600000000000000,…
Tasha
  • 13
  • 3
1
vote
0 answers

Plotting uncertainty from raster predictions

I'm using the predict function from the raster package to predict species occurrence from a raster brick in R using a previously fitted model. Prediction plot works fine, and now I'm trying to create a corresponding plot of prediction uncertainty at…
Kendra
  • 11
  • 1