summaryrefslogtreecommitdiff
path: root/cleaner.go
diff options
context:
space:
mode:
Diffstat (limited to 'cleaner.go')
-rw-r--r--cleaner.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cleaner.go b/cleaner.go
index c32abaf..6e8832f 100644
--- a/cleaner.go
+++ b/cleaner.go
@@ -15,6 +15,7 @@ const (
DATABASE_NAME = "netflow"
MAXIMUM_ENTRIES = 100
TIMESPAN = "day"
+ EPSILON = 1
)
func cleanData() (err error) {
@@ -38,6 +39,11 @@ func cleanData() (err error) {
return
}
+ //Add noise for differential privacy
+ for i := range cDat {
+ cDat[i].occurances = diffpriv(cDat[i].occurances, 1, EPSILON)
+ }
+
//Begin transaction
tx, err := db.Begin()
if err != nil {