This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I have implemented a naive bayes classifier for a multivariate Gaussian distribution. I have 3 classes, C1, C2 and C3.
I know P(error) is defined as the number of items that were classified incorrectly divided by the total number of items – for instance the number of times a items that belonged to class 1 were assigned labels for class 2 or 3.
A simple way to compute the P(error) numerically would be to compute the confusion matrix first and then just sum the number of elements assigned incorrectly.
The total probability error would be: P(error)_C1 P(error)_C2 P(error)_C2
I have confusion about what number to divide by – should I divide by the total number of items in the data-set or divide each sum by the total number of items for that particular class i.e.:
Should it be:
P(error)_C1 = number of items classified as C2 and C3 / total items in the dataset
or
P(error)_C1 = number of items classified as C2 and C3 / total items in C1
Subreddit
Post Details
- Posted
- 5 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/AskStatisti...