You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Measurements
x =5.2±0.4
x-x !=zero(x)
x*x != x^2tan(x) !=sin(x)/cos(x)
because the package doesn't support correlation between variables.
I don't really know how the covariance matrix should be calculated in this case, where there are two single measurements, not two elements of a population. Any hint on this is appreciated.
After looking at the user guide of the Python package uncertainties, I think that the Measurement type should be extended to have two extra fields: a unique tag to identify each measurement (so that two measurement with the same value and uncertainty are equal), and the list of derivatives of variables constituting the object. For example:
# Definition. The Measurement type is composed by the following fields:# * val: the nominal value of the measurement# * err: the uncertainty, assumed to be standard deviation# * tag: a (hopefully) unique identifier, it is used to identify a specific# measurement in the list of derivatives.# * der: the list of derivates. It is a dictionary, whose keys are the tags# of the quantities with which the measurement has been derived, and the# corresponding value is the derivative of the new measurement with respect# to that measurement. This dictionary is useful to trace the contribution# of each measurement.
immutable Measurement{T<:Real} <:Real
val::T
err::T
tag::Float64
der::Dict{Float64, T}end# ConstructorfunctionMeasurement(val::Real, err::Real)
val, err, der =promote(val, err, one(val))
tag =rand()
returnMeasurement(val, err, tag, Dict(tag=>der))
end
This change, necessary to make the package fully work, will definitely degrade performance, so it needs to be thought carefully. Input is very welcome.
The text was updated successfully, but these errors were encountered:
Performance is less than optimal (but should be better in Julia 0.5),
for the time being I try to implement the algorithm to support
correlation, then I’ll try to smooth the rough edges off.
See issue #3.
The task outlined in issue #3 (support for correlation between varibles)
is complete, but performance should be improved in order to make this
feature more usable.
This has been implemented in commits 6f8fb48...590d423 (from 6f8fb48 Move @uncertain to math.jl file to 590d423 10x improvement for "result" function for more than one argument; see 6f8fb48...590d423)
Currently,
because the package doesn't support correlation between variables.
I don't really know how the covariance matrix should be calculated in this case, where there are two single measurements, not two elements of a population. Any hint on this is appreciated.
After looking at the user guide of the Python package
uncertainties
, I think that theMeasurement
type should be extended to have two extra fields: a unique tag to identify each measurement (so that two measurement with the same value and uncertainty are equal), and the list of derivatives of variables constituting the object. For example:This change, necessary to make the package fully work, will definitely degrade performance, so it needs to be thought carefully. Input is very welcome.
The text was updated successfully, but these errors were encountered: