Last active
April 10, 2020 08:43
-
-
Save tarlanahad/6272d58ea53954c45a0275f76889f6c6 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
import numpy as np | |
class NaiveBayes: | |
def __init__(self, X, y): | |
self.priors = [] # List of priors - P(y) for each class | |
self.stds = [] # List of STDs of feature columns | |
self.means = [] # List of Mean of feature columns | |
self.classes = np.unique(y) # unique class labels | |
self.X = X | |
self.y = y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment