defNBAccuracy(features_train, labels_train, features_test, labels_test):""" compute the accuracy of your Naive Bayes classifier """### import the sklearn module for GaussianNBfrom sklearn.naive_bayes import GaussianNB
### create classifier
clf = GaussianNB()
### fit the classifier on the training features and labels
clf.fit(features_train, labels_train)
### use the trained classifier to predict labels for the test features
pred = clf.predict(features_test)
### calculate and return the accuracy on the test datafrom sklearn.metrics import accuracy_score
accuracy = accuracy_score(labels_test, pred)
return accuracy