diff options
| -rw-r--r-- | cleaner.go | 3 | ||||
| -rw-r--r-- | config.go | 1 | ||||
| -rw-r--r-- | config.json | 1 |
3 files changed, 3 insertions, 2 deletions
@@ -14,7 +14,6 @@ const ( DATABASE_PASS = "nil" DATABASE_CONNECTION = "" //e.g. "tcp(localhost:55555) DATABASE_NAME = "netflow" - EPSILON = 1000 ) func cleanData(conf Config) (err error) { @@ -61,7 +60,7 @@ func cleanData(conf Config) (err error) { //Add noise for differential privacy for i := range cDat { - cDat[i].occurances = diffpriv(cDat[i].occurances, 1, EPSILON) + cDat[i].occurances = diffpriv(cDat[i].occurances, 1, conf.Epsilon) } //Begin transaction @@ -9,6 +9,7 @@ import ( type Config struct { Volumes []VolumeInfo `json:volumes` Interval string `json:interval` + Epsilon float64 `json:epsilon` } type VolumeInfo struct { diff --git a/config.json b/config.json index 10519b7..645a760 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,6 @@ { "interval": "5min", + "epsilon": 10000, "volumes": [ { "size": "small", |
