checks

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2024 License: Apache-2.0, BSD-3-Clause Imports: 3 Imported by: 1

Documentation

Overview

Package checks contains checks for differentially private functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAlpha

func CheckAlpha(alpha float64) error

CheckAlpha returns an error if the supplied alpha is not between 0 and 1.

func CheckBoundsFloat64

func CheckBoundsFloat64(lower, upper float64) error

CheckBoundsFloat64 returns an error if lower is larger than upper, or if either parameter is ±∞.

func CheckBoundsFloat64AsInt64

func CheckBoundsFloat64AsInt64(lower, upper float64) error

CheckBoundsFloat64AsInt64 returns an error if lower is larger are NaN, or if either parameter overflow after conversion to int64.

func CheckBoundsFloat64IgnoreOverflows

func CheckBoundsFloat64IgnoreOverflows(lower, upper float64) error

CheckBoundsFloat64IgnoreOverflows returns an error if lower is larger than upper but accepts either parameter being ±∞.

func CheckBoundsInt64

func CheckBoundsInt64(lower, upper int64) error

CheckBoundsInt64 returns an error if lower is larger than upper, and ensures it won't lead to sensitivity overflow.

func CheckBoundsInt64IgnoreOverflows

func CheckBoundsInt64IgnoreOverflows(lower, upper int64) error

CheckBoundsInt64IgnoreOverflows returns an error if lower is larger than upper but ignores sensitivity overflows. This is used when noise is unrecognised.

func CheckBoundsNotEqual

func CheckBoundsNotEqual(lower, upper float64) error

CheckBoundsNotEqual returns an error if lower and upper bounds are equal.

func CheckBranchingFactor

func CheckBranchingFactor(branchingFactor int) error

CheckBranchingFactor returns an error if branchingFactor is less than 2.

func CheckDelta

func CheckDelta(delta float64, name ...string) error

CheckDelta returns an error if δ is negative or greater than or equal to 1.

func CheckDeltaStrict

func CheckDeltaStrict(delta float64, name ...string) error

CheckDeltaStrict returns an error if δ is nonpositive or greater than or equal to 1.

func CheckEpsilon

func CheckEpsilon(epsilon float64, name ...string) error

CheckEpsilon returns an error if ε is strictly negative or +∞.

func CheckEpsilonStrict

func CheckEpsilonStrict(epsilon float64, name ...string) error

CheckEpsilonStrict returns an error if ε is nonpositive or +∞.

func CheckEpsilonVeryStrict

func CheckEpsilonVeryStrict(epsilon float64, name ...string) error

CheckEpsilonVeryStrict returns an error if ε is +∞ or less than 2⁻⁵⁰.

func CheckL0Sensitivity

func CheckL0Sensitivity(l0Sensitivity int64) error

CheckL0Sensitivity returns an error if l0Sensitivity is nonpositive.

func CheckLInfSensitivity

func CheckLInfSensitivity(lInfSensitivity float64) error

CheckLInfSensitivity returns an error if lInfSensitivity is nonpositive or +∞.

func CheckMaxContributionsPerPartition

func CheckMaxContributionsPerPartition(maxContributionsPerPartition int64) error

CheckMaxContributionsPerPartition returns an error if maxContributionsPerPartition is nonpositive.

func CheckNoDelta

func CheckNoDelta(delta float64, name ...string) error

CheckNoDelta returns an error if δ is non-zero.

func CheckPreThreshold

func CheckPreThreshold(preThreshold int64) error

CheckPreThreshold returns an error if preThreshold is less than 0.

func CheckThresholdDelta

func CheckThresholdDelta(thresholdDelta, noiseDelta float64) error

CheckThresholdDelta returns an error if δ_threshold is nonpositive or greater than or equal to 1 or δ_threshold+δ_noise is greater than or equal to 1.

func CheckTreeHeight

func CheckTreeHeight(treeHeight int) error

CheckTreeHeight returns an error if treeHeight is less than 1.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL