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
0
votes
1 answer

Calculating the negative log likelihood of an array of predictions in Python

I have a list of actual values: Y, and a list of list: predictions, where each element is 100 predictions of that Y value of the same index. How can I calculate the negative log likelihood of the predictions in Python? I'm guessing it will involve…
0
votes
0 answers

Plotting future uncertainty on line graph with ggplot in R

I am looking for a way in ggplot to plot an historic line of data which then merges into a shaded area representing future uncertainty (like the GHG emissions graphs below - but at the moment I just want one trajectory into the future - and even…
DJD
  • 31
  • 3
0
votes
0 answers

Getting "ValueError: data type not inexact" error while trying to linear fit a dataset using uncertainities

I am very new to python so i am struggling a lot to do what i want to do, so i figured i could ask. I have an excel sheet with data columns like period, pdot, flux values etc. There are also error columns associated with these. I want to plot these…
0
votes
0 answers

Probabilistic CNN using pre-trained models

I am currently working on estimating uncertainty in deep learning models. I came across this tutorial where a probablistic CNN is implemented for classification of MNIST dataset. However, the model is a custom deep model as show below def…
0
votes
0 answers

How to evaluate conditionally modeled distribution(uncertainty) with pymc3

I'm a newbie to pymc3 and bayesian analysis. What I want to analyze is as follows: data schema: (with 60000 rows) x_1, x_2, survival_duration I want to model how 'amazing' a certain case is, with features x_1 and x_2(Not the exact prediction…
ryanc
  • 1
  • 1
0
votes
0 answers

Passing a ufloat argument to a numpy mathematical function

I've been using the uncertainties library for calculation of the gaussian error propagation with good results for quite some time. The problem is that I use the numpy library for all mathematical functions like sin(), sqrt(), and so on. Which does…
Mark
  • 131
  • 9
0
votes
0 answers

Cygwin linking TEMPLATE file in INPUT file for Dakota Simulation

I am trying to run a dakota simulation in cygwin. There is a TEMPLATE file, an INPUT file, and an SH file. I get the following errors when trying to run. I believe the INPUT file is not linking the TEMPLATE file correctly but cannot figure out why.…
0
votes
0 answers

Is it possible to calculate the uncertainty value from correlation?

Refer to this journal '[A Survey on Trust Modeling][1]'-ACM computing survey,equation no:17 The equation is related to calculate uncertainty from probability: H(p) = −plog2(p) − (1 − p) log2(1 − p) So according to this equation when probability,…
jannatul
  • 1
  • 1
0
votes
0 answers

How can I validate that aleatoric uncertainty is well-trained?

I'm trying to implement a neural network that learns aleatoric uncertainty for regression task using pytorch according to Kendall et al. It seems that the training have done well, which means learning curve converged and predicted mean values fitted…
0
votes
1 answer

python uncertainty package: error propagation in curve_fit

I would like to use the uncertainty package in python to propagate errors in a Gaussian fitting. I have experimental data, x and y, and I have uncertainty on both of them. The y is approximated to follow a Gaussian relationship with x, so I fit it…
0
votes
1 answer

How to get uncertainty/covariance in estimating the pose of ArUco marker - OpenCV

I am using OpenCV's cv2.aruco.estimatePoseSingleMarkers function to estimate the pose of an ArUco marker & it works well. However, I also want the uncertainty / covariance in the pose estimate. Is there a way to achieve this?
0
votes
2 answers

Function that calculates uncertainty

As you may or may not know, the formula for the uncertainty in a variable defined by some function is given by: . I want to create a python function that does this for me. This is what I currently have: import sympy as sp from sympy import…
0
votes
4 answers

How to access the nominal values and uncertainties in a Pandas DataFrame?

I am using the uncertainties module along with Pandas. At present, I am able to output the dataframe with the uncertainties together to a spreadsheet. My main objective is to write the dataframe with the uncertainties in an adjacent column. But how…
Tom Kurushingal
  • 6,086
  • 20
  • 54
  • 86
0
votes
0 answers

How to pass a dataframe to function (improve efficiency of code)

I need to evaluate the equations from dataframe using the asteval and uncertainties libraries. I found the way to make it work by iterating over equations and passing each equation separately to the evaluate function. Is there a way to improve…
0
votes
2 answers

How dynamically change the precision of value using {:10.4f}'.format( [Python]

I have a variable "n" that contains a number of digits that need to be displayed for the value. How to pass the "n" to '{:10.nf}'.format()? import uncertainties from uncertainties.umath import * val_err = uncertainties.ufloat(5, 0.01) result =…