checks

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 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(label string, alpha float64) error

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

func CheckBoundsFloat64

func CheckBoundsFloat64(label string, lower, upper float64) error

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

func CheckBoundsFloat64AsInt64

func CheckBoundsFloat64AsInt64(label string, 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(label string, lower, upper float64) error

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

func CheckBoundsInt64

func CheckBoundsInt64(label string, 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(label string, 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(label string, lower, upper float64) error

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

func CheckBranchingFactor

func CheckBranchingFactor(label string, branchingFactor int) error

CheckBranchingFactor returns an error if branchingFactor is less than 2.

func CheckConfidenceLevel

func CheckConfidenceLevel(label string, confidenceLevel float64) error

CheckConfidenceLevel returns an error if the supplied confidence level is not between 0 and 1.

func CheckDelta

func CheckDelta(label string, delta float64) error

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

func CheckDeltaStrict

func CheckDeltaStrict(label string, delta float64) error

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

func CheckEpsilon

func CheckEpsilon(label string, epsilon float64) error

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

func CheckEpsilonStrict

func CheckEpsilonStrict(label string, epsilon float64) error

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

func CheckEpsilonVeryStrict

func CheckEpsilonVeryStrict(label string, epsilon float64) error

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

func CheckL0Sensitivity

func CheckL0Sensitivity(label string, l0Sensitivity int64) error

CheckL0Sensitivity returns an error if l0Sensitivity is nonpositive.

func CheckLInfSensitivity

func CheckLInfSensitivity(label string, lInfSensitivity float64) error

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

func CheckMaxPartitionsContributed

func CheckMaxPartitionsContributed(label string, maxPartitionsContributed int64) error

CheckMaxPartitionsContributed returns an error if maxPartitionsContributed is nonpositive.

func CheckNoDelta

func CheckNoDelta(label string, delta float64) error

CheckNoDelta returns an error if δ is non-zero.

func CheckTreeHeight

func CheckTreeHeight(label string, 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