We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
0 parents commit 9e7b64eCopy full SHA for 9e7b64e
ClassifyNB.py
@@ -0,0 +1,13 @@
1
+def classify(features_train, labels_train):
2
+ ### import the sklearn module for GaussianNB
3
+ ### create classifier
4
+ ### fit the classifier on the training features and labels
5
+ ### return the fit classifier
6
+
7
8
+ ### your code goes here!
9
+ from sklearn.naive_bayes import GaussianNB
10
+ clf = GaussianNB()
11
+ clf.fit(features_train,labels_train)
12
+ pred = clf.predict(features_train)
13
+ return clf
0 commit comments