Trait smartnoise_validator::components::Accuracy[][src]

pub trait Accuracy {
    fn accuracy_to_privacy_usage(
        &self,
        accuracies: &Accuracies,
        public_arguments: IndexMap<IndexKey, &Value>
    ) -> Result<Option<Vec<PrivacyUsage>>>;
fn privacy_usage_to_accuracy(
        &self,
        public_arguments: IndexMap<IndexKey, &Value>,
        alpha: f64
    ) -> Result<Option<Vec<Accuracy>>>; }

Accuracy component trait

Components with Accuracy implemented may convert between privacy units and accuracy estimates

Required methods

fn accuracy_to_privacy_usage(
    &self,
    accuracies: &Accuracies,
    public_arguments: IndexMap<IndexKey, &Value>
) -> Result<Option<Vec<PrivacyUsage>>>
[src]

fn privacy_usage_to_accuracy(
    &self,
    public_arguments: IndexMap<IndexKey, &Value>,
    alpha: f64
) -> Result<Option<Vec<Accuracy>>>
[src]

Loading content...

Implementors

impl Accuracy for Component[src]

fn accuracy_to_privacy_usage(
    &self,
    accuracy: &Accuracies,
    public_arguments: IndexMap<IndexKey, &Value>
) -> Result<Option<Vec<PrivacyUsage>>>
[src]

Utility implementation on the component.

This utility delegates evaluation to the concrete implementation of each component variant.

fn privacy_usage_to_accuracy(
    &self,
    public_arguments: IndexMap<IndexKey, &Value>,
    alpha: f64
) -> Result<Option<Vec<Accuracy>>>
[src]

Utility implementation on the component.

This utility delegates evaluation to the concrete implementation of each component variant.

impl Accuracy for GaussianMechanism[src]

impl Accuracy for LaplaceMechanism[src]

impl Accuracy for SimpleGeometricMechanism[src]

impl Accuracy for SnappingMechanism[src]

Loading content...