←back to thread

Uncertain<T>

(nshipster.com)
444 points samtheprogram | 1 comments | | HN request time: 0s | source
Show context
boscillator ◴[] No.45055418[source]
Does this handle covariance between different variables? For example, the location of the object your measuring your distance to presumably also has some error in it's position, which may be correlated with your position (if, for example, if it comes from another GPS operating at a similar time).

Certainly a univarient model in the type system could be useful, but it would be extra powerful (and more correct) if it could handle covariance.

replies(4): >>45056007 #>>45056398 #>>45060737 #>>45062423 #
1. flaghacker ◴[] No.45062423[source]
Using this sampling-based approach you get correct covariance modeling for free. You have to only sample leaf values that are used in multiple places once per evaluation, but it looks like they do just that: https://github.com/mattt/Uncertain/blob/962d4cc802a2b179685d...