Last active
June 18, 2020 12:29
-
-
Save tavuong/fc9aa46f1eeaed95063ee5b622829c9b to your computer and use it in GitHub Desktop.
Normalize Summe function for Covid19-data
This file contains hidden or 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
def ta_vuong_norm_s (y): | |
# Covid19 _VuongSimulator | |
# ---- VUONG-Aligorithm: Normalyse Summe function | |
# Author: Dr. The Anh Vuong | |
# (c) 2020 by Dr.-The Anh Vuong | |
# Licence: MIT , Patent right is reserved | |
#-------------------------------------------------- | |
# y: input | |
# y3 = ta_norm : calculead output | |
# y3 generated | |
y3 = [] | |
k = 0 | |
for k in y: | |
y3.append(0.0) | |
#------ y3 = Acummulated y []--- | |
k = 0 | |
summe = 0 | |
for i in y: | |
summe = y[k] + summe | |
y3[k] = summe | |
k = k+1 | |
#------- Maximal search -------- | |
y3np = np.matrix(y3) | |
y3max = y3np.max() | |
summe = y3max | |
k = 0 | |
ywert = 0.0 | |
for i in y: | |
ywert = y [k] | |
y3[k] = 100.0*ywert/summe | |
k = k+1 | |
return y3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment