This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Evaluation source code | |
Author: Kenneth Emeka Odoh | |
References: | |
https://becominghuman.ai/differential-privacy-noise-adding-mechanisms-ede242dcbb2e | |
https://arxiv.org/pdf/1912.04222.pdf | |
https://www.cis.upenn.edu/~aaroth/Papers/privacybook.pdf | |
Code was tested in Pthon 2.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pyflux as pf | |
import pandas as pd | |
class TimeSeriesPrediction: | |
'Common base for time series prediction' | |
iterations=500 | |
updateFlag=False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = 0; b = 4; c = -2; d = 2 | |
n = 20; | |
h = (b - a)/n; k = (d - c)/n; | |
x= a:h:b; y=c:k:d; | |
totallist = zeros( 1, length(y) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import math | |
import decimal | |
def calculatePi (num_of_iteration): | |
""" | |
Gauss Legendre iterative algorithm | |
This repeats the given calculation a number of times until it converges at the desired output. This is faster than infinitive series algorithm although consume more memory like in our solution. The size of the list increases and that affect space complexity. | |
""" |