Created
July 24, 2018 18:45
-
-
Save josemariagarcia95/24a7fbe07f866bd91604d3378ec8c336 to your computer and use it in GitHub Desktop.
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
import numpy as np | |
import scipy.stats | |
#train - DataFrame | |
relevant_features = ["duration", "src_bytes", "dst_bytes"] | |
means = np.mean(train[relevant_features].values, axis=0) | |
stds = np.std(train[relevant_features].values, axis=0) | |
#creates norm distribution for each data | |
unorms = [] | |
for var in range(len(means)): | |
unorms.append(scipy.stats.norm(means[var],stds[var])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment