-
-
Save zachlim98/ef5f88be79db696ffe744d5ebd1efb3e to your computer and use it in GitHub Desktop.
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
for i in range(len(data)): | |
if (data["Pos"][i] == 1): | |
data["TW"][i] = 1/len(datalist) | |
elif (data["Pos"][i] == -1): | |
data["TW"][i] = -(1/len(datalist)) | |
else: | |
data["TW"][i] = 0 | |
weights = data["TW"] | |
return weights |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment