Skip to content

Library for using the differential privacy for Gaussian processes framework

Notifications You must be signed in to change notification settings

lionfish0/dp4gp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

afd0222 · Jul 19, 2019

History

19 Commits
Jul 19, 2019
Nov 6, 2018
Jul 15, 2017
Jun 12, 2018
Jul 15, 2017

Repository files navigation

Differential Privacy for Gaussian Processes

Installation

Clone the repo and use pip to install;

git clone https://github.com/lionfish0/dp4gp.git
cd dp4gp
pip install -e .

Usage

Fairly simple to use. Simply build a normal Gaussian Process regression model in GPy, using any kernel you would like. Then pass it to the dp4gp method of your choice.

from dp4gp import dp4gp
import numpy as np
import GPy
import matplotlib.pyplot as plt
%matplotlib inline

X = np.arange(0,10,0.1)[:,None]
Y = np.sin(X)+np.random.randn(len(X),1)*0.4
kern = GPy.kern.RBF(1.0,lengthscale=2.0,variance=1.0)
model = GPy.models.GPRegression(X,Y,kern,normalizer=None)
#model = GPy.models.SparseGPRegression(X,Y,kern,normalizer=None)
model.Gaussian_noise = 0.3

dpgp = dp4gp.DPGP_cloaking(model,ac_sens,epsilon=1.0,delta=0.01)
#dpgp = dp4gp.DPGP_inducing_cloaking(model,ac_sens,epsilon=1.0,delta=0.01)

dpgp.plot(plot_data = True,extent_lower={0:0},extent_upper={0:20},Nits=100,confidencescale=[1.0]);
plt.ylim([-5,5])

About

Library for using the differential privacy for Gaussian processes framework

Resources

Stars

Watchers

Forks

Packages

No packages published