uncertainty

calculate Entropy for each class of the test set to measure uncertainty on pytorch

无人久伴 提交于 2021-02-10 05:11:13
问题 I am trying to calculate Entropy of each class of the dataset for an image classification task to measure uncertainty on pytorch,using the MC Dropout method and the solution proposed in this link Measuring uncertainty using MC Dropout on pytorch First,I have calculated the mean of each class per batch across different forward passes (class_mean_batch) and then for all the testloader (classes_mean) and then did some transformations to get (total_mean) to use it for calculating Entropy as shown

Operator Overloading in Excel VBA

徘徊边缘 提交于 2021-01-02 06:37:55
问题 What I would like to do: I would like to use operator overloading in Excel to run custom functions on my custom data types. For example, when evaluating a formula, I want Excel to run my function instead of the '+' operator when the calculation involves one of my custom data types. Why I want to do it: In analytical chemistry, every number has an uncertainty attached to it and is written: 13.56 (±0.02) mm I would like to create a custom data type that keeps the magnitude and the uncertainty

Operator Overloading in Excel VBA

余生长醉 提交于 2021-01-02 06:37:30
问题 What I would like to do: I would like to use operator overloading in Excel to run custom functions on my custom data types. For example, when evaluating a formula, I want Excel to run my function instead of the '+' operator when the calculation involves one of my custom data types. Why I want to do it: In analytical chemistry, every number has an uncertainty attached to it and is written: 13.56 (±0.02) mm I would like to create a custom data type that keeps the magnitude and the uncertainty

Operator Overloading in Excel VBA

╄→尐↘猪︶ㄣ 提交于 2021-01-02 06:36:01
问题 What I would like to do: I would like to use operator overloading in Excel to run custom functions on my custom data types. For example, when evaluating a formula, I want Excel to run my function instead of the '+' operator when the calculation involves one of my custom data types. Why I want to do it: In analytical chemistry, every number has an uncertainty attached to it and is written: 13.56 (±0.02) mm I would like to create a custom data type that keeps the magnitude and the uncertainty

Measuring uncertainty using MC Dropout on pytorch

穿精又带淫゛_ 提交于 2020-12-06 16:01:47
问题 I am trying to implement Bayesian CNN using Mc Dropout on Pytorch, the main idea is that by applying dropout at test time and running over many forward passes , you get predictions from a variety of different models. I’ve found an application of the Mc Dropout and I really did not get how they applied this method and how exactly they did choose the correct prediction from the list of predictions here is the code def mcdropout_test(model): model.train() test_loss = 0 correct = 0 T = 100 for

How do I include errors for my data in the lmfit least squares miniimization, and what is this error for conf_interval2d function in lmfit?

夙愿已清 提交于 2020-08-21 06:55:51
问题 I am new to python, and trying to use the lmfit package to check my own calculations, however I am unsure (1) as to how to include the errors for data (sig) for the following test (and 2) of an error I get with conf_interval2d shown below): import numpy as np from lmfit import Parameters, Minimizer, conf_interval, conf_interval2d, minimize, printfuncs x=np.array([ 0.18, 0.26, 1.14, 0.63, 0.3 , 0.22, 1.16, 0.62, 0.84,0.44, 1.24, 0.89, 1.2 , 0.62, 0.86, 0.45, 1.17, 0.59, 0.85, 0.44]) data=np

How to propagate error when using scipy quad on a spline of data with measurement error?

你说的曾经没有我的故事 提交于 2020-06-17 09:51:31
问题 I have a data set with N points which I fit a spline to and integrate using scipy.integrate.quad. I would like to use the N associated measurement errors to put an error estimate on the final integral value. I originally tried to use the uncertainties package but the x+/-stddev objects did not work with scipy. def integrand(w_point, x, y): #call spline function to get data arbitrary points f_i = spline_flux_full(x, y, w_point) #use spline for normalizing data at arbitrary points f_i_continuum

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

依然范特西╮ 提交于 2020-01-06 06:07:27
问题 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 then the expected output may look like 123450 ± 1.2 (× 10 -3 ) where the following rules are used: the error always has one or two significant digits. Two if the first digit is 1 (ignoring the leading zeros) the mean value is rounded to drop

How to calculate prediction uncertainty using Keras?

梦想的初衷 提交于 2019-12-18 10:33:32
问题 I would like to calculate NN model certainty/confidence (see What my deep model doesn't know) - when NN tells me an image represents "8", I would like to know how certain it is. Is my model 99% certain it is "8" or is it 51% it is "8", but it could also be "6"? Some digits are quite ambiguous and I would like to know for which images the model is just "flipping a coin". I have found some theoretical writings about this but I have trouble putting this in code. If I understand correctly, I

How to calculate prediction uncertainty using Keras?

折月煮酒 提交于 2019-12-18 10:33:10
问题 I would like to calculate NN model certainty/confidence (see What my deep model doesn't know) - when NN tells me an image represents "8", I would like to know how certain it is. Is my model 99% certain it is "8" or is it 51% it is "8", but it could also be "6"? Some digits are quite ambiguous and I would like to know for which images the model is just "flipping a coin". I have found some theoretical writings about this but I have trouble putting this in code. If I understand correctly, I