dyedgreen / uncertain Goto Github PK
View Code? Open in Web Editor NEWFast and correct computations with uncertain values
Home Page: https://crates.io/crates/uncertain
License: MIT License
Fast and correct computations with uncertain values
Home Page: https://crates.io/crates/uncertain
License: MIT License
Not sure how possible this is, but a #![no_std]
option seems potentially useful. Could allow you to make more accurate sensor readings in IoT networks by taking into account local variances to decide measurement tolerances (like reading pressure or temp to determine the accuracy of other readings the device could do).
That way your receiver that processes off the info doesn't have to do an educated guess on the tolerances per device (because you might have different sensors with different tolerances), it'd instead be encoded in the data stream for it to parse.
Blog post on the technique: https://www.possiblerust.com/pattern/3-things-to-try-when-you-can-t-make-a-trait-object
pros:
pr_with
methodcons:
It might be interesting to offer evaluation of expectations for uncertain values which are floating point values.
There are a few questions around how to best do that:
Into<f64>
async
contexts without worrying about blocking (like you can pr
)?Send
, but they are not sync, also I think it's better to give control over threading to user: can send value to other thread if they want to)fn get_value() -> impl Uncertain<Value = f64>;
let x = get_value();
let expected_value = x.expectation(); // should ideally be cheap to run (!)
// or maybe
let expected_value = x.expect();
let expected_value = x.e(); // short like `pr`? probably not -> it's more expensive, so should not be easy to miss the call
The contract for epoch
caching is confusing, and most values that are e.g. returned from sensors should probably implement Clone
.
Implementing Distribution
is easier, more compatible with other crates, and allows us to guarantee that computations are always correct, even if foreign types are used.
Apparently, the wyhash RNG is a lot faster than PCG. It might be worth to add some benchmarks and see if using this algorithm improves performance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.