Naive Bayes Classification

https://colab.research.google.com/drive/162ggg93a52-YCu7Bu0yn4KhyzUmOZrQE?usp=sharing

Hey @neelanshgulati100,

def prior(Y_train,label):
  return float(np.sum(Y_train==label)/Y.train.shape[0]) 

The error is it should not be Y.train.shape[0]. It should be Y_train.shape[0].

Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.