Trait Sampleable

Source
pub trait Sampleable {
    // Required methods
    fn sample(&self) -> Value;
    fn liklihood(&self, value: &Value) -> Result<f64, &str>;
}
Expand description

A trait that you can implement to create your own distributions to sample from in a generative model.

Required Methods§

Source

fn sample(&self) -> Value

Sample a value from the distribution.

Source

fn liklihood(&self, value: &Value) -> Result<f64, &str>

Compute the liklihood of a given value being sampled from the distribution.

Implementors§