Code Monkey home page Code Monkey logo

uncertain's People

Contributors

dyedgreen avatar ivfranco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

isgasho

uncertain's Issues

Add `#![no_std]` option?

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.

Computation of expected values

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:

  • Should sample count be fixed?
  • Should the variance be reported?
  • Fixed sample count or convergence measure to stop sampling early?
  • Restrict to Float, or also allow integers(?), or maybe go completely different route with Into<f64>
  • Can we make the evaluation cheap enough such that it can be used e.g. in async contexts without worrying about blocking (like you can pr)?
  • Built in multi threading? (Probably not, most Uncertain values are 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)

Proposed API

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

Consider sealing the trait

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.