Created
January 12, 2020 11:39
-
-
Save jamescalam/6a6c89e58a3998e553f2a01377e3aa83 to your computer and use it in GitHub Desktop.
Example code snippet for Naive Bayes fundamentals article, part [3]
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
def mean(x): | |
return sum(x) / len(x) # calculate mean (in reality use np.mean(x)) | |
less_mean = mean(less) | |
more_mean = mean(more) # calculate mean for both models |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment