go

module
Version: 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

README

Differential Privacy in Go

This is the Go implementation of the differential privacy library. For general details and key definitions, see the top-level documentation. This document describes Go-specific aspects.

How to Use

Usage of the Go Differential Privacy library is demonstrated in the codelab.

Full documentation of the API is available as godoc.

Using with the "go" Command

For building the differential privacy library with the "go" command, you can run the following:

go build -mod=mod ./...

This will build all the packages. -mod=mod is necessary for installing all the dependencies automatically. Otherwise, you'll be asked to install each dependency manually.

Similarly, you can run all the tests with:

go test -mod=mod ./...

If you already built the code with go build, you can omit -mod=mod.

If you wish to run the codelab, you can do so by (from the root of the repository):

cd examples/go/main
go run -mod=mod . -scenario=CountVisitsPerHour -input_file=../data/day_data.csv -non_private_output_file=out1.csv -private_output_file=out2.csv

Change scenario and input_file to run other scenarios. Check out the README for more information.

Directories

Path Synopsis
Package checks contains checks for differentially private functions.
Package checks contains checks for differentially private functions.
Package dpagg contains differentially private aggregation primitives.
Package dpagg contains differentially private aggregation primitives.
Package noise contains methods to generate and add noise to data.
Package noise contains methods to generate and add noise to data.
Package rand provides methods for generating random numbers from distributions useful for the differential privacy library.
Package rand provides methods for generating random numbers from distributions useful for the differential privacy library.

Jump to

Keyboard shortcuts

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