Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

A naive Bayes classifier is a simple probabilistic classifier based on applying Bayes' theorem with strong independence assumptions. A more descriptive term for the underlying probability model would be "independent feature model".

2
votes
2answers
500 views

Trouble understanding Bayes Theorem

I was watching a video on YouTube and i am not sure if the given solution is correct. Can someone confirm?
0
votes
0answers
17 views

How do document lengths affect Gaussian Naive Bayes?

I'm trying to understand Gaussian Naive Bayes. I am training on a pre-processed subset of the 20 Newsgroup data. Each observation is around 500 attributes (words), and 1 class (of 5 possible). I ...
0
votes
0answers
46 views

When can a feature independence assumption be reasonable and when not?

For example, Naïve Bayes assumes that the features are conditionally independent and they perform really well. Is there a time when assuming features are conditionally independent not so reasonable? ...
0
votes
0answers
10 views

Testing if word-count vectors follow a multinomial distribution

I am attempting to make a Naive Bayes classifier for word count vectors (each document is represented as a vector of word counts). For this, I am using SciKit-Learn's MultinomialNB. From what I ...
1
vote
1answer
60 views

Proving that Gaussian Naive Bayes Decision Boundary is Linear

I need to come up with a Proof that Gaussian Naive Bayes has a linear decision boundary (In this case for Y={0,1}) I tried to work it out, but I am not able to pull out the xi term as it is stuck in ...
0
votes
0answers
25 views

Predicting a combination

Question Suppose we have a training set of families. Where each family is defined as such… Family: A list of integers. Each integer is the age of one of the family members. (e.g. with a 45 year ...
0
votes
0answers
26 views

Matching new products with products those have actual sales data

New fashion products are arriving every season so I do not have historical sales data for them. Hence, I am using product attributes such as size,color, material, product group, price and some other ...
3
votes
1answer
35 views

Does 'Conditional Independence' means there should be no multicollinearity among features?

I was reading the Naive Bayes article on Wikipedia and I read that, In Naive Bayes, the naive assumption that Naive Bayes make is "each feature is conditionally independent of every other feature, ...
0
votes
0answers
36 views

Why Naive Bayes can reduce number of parameters?

I read from a book that the naive Bayes classifier makes a conditional independence assumption that reduces the number of parameters from $O(2^d)$ to $O(d)$. But I am super confused about this ...
0
votes
0answers
148 views

How Probable is a Set? [closed]

Introduction Work Orders (WOs) are instructions to a technician to perform specific maintenance actions on a specific piece of machinery. I have some work order data that includes which parts were ...
0
votes
0answers
16 views

Suitable Machine Learning Classifier for Numerical and categorical dataset?

Does anybody know! what are the suitable machine learning algorithms --e.g., bayesian network, decision tree, OneR, etc.-- to learn the model from a dataset with limited instances --e.g, less than 10 ...
0
votes
1answer
32 views

Threshold to build confusion matrix?

I a have data set with 10 sections of data and each section shows one day observation. I designed the training and test set as follows: 8 sections for training the data and the last two sections for ...
0
votes
0answers
22 views

Naive Bayes Assignment of Feature Probability

I'm using the .show_most_informative_features() function from NLTK's Naive Bayes to generate features to be used with a lexicon. In the case of my binary-classification problem, these features are ...
0
votes
0answers
38 views

Naive Bayes for probability estimates

I am using a naive bayes algorithm to derive probabilities of a certain object's belonging to a class. I know that naive bayes is a classifier and doesn't yield the most accurate probabilities, the ...
1
vote
0answers
63 views

multinomial Naive Bayes: how to calculate likelihood and posterior?

For a multinomial Naive Bayes model for $C$ classes and $D$ features, assuming $\theta \in \mathcal{R}^{C x D}$ is the matrix whose $\theta_{cj} $ element corresponds to $Prob(x_j = 1 | y= c)$, and $\...
0
votes
1answer
49 views

Can you help me to understand this deduction for proving Naive Bayes is a Linear Classifier?

In this tutorial on Naive Bayes Classififer in section 1.1, the author proved naive bayes is a linear classifier. Consider binary classification where $y=0$ or $1$. Our classification rule with ...
1
vote
0answers
14 views

Naive Bayes: Understanding the Entropy equation

I am trying to understand the entropy equation: -p1*log2(p1) - p2*log2(p2) - pn*log2(pn) Specifically why do we multiply each log by the probability? In the ...
0
votes
1answer
20 views

natural language processing analysis

I have selected SMS Spam Collection as my dataset for natural language processing task. I have done many pre-processing tasks on dataset such as removing punctuations, spell correction, stemming, and ...
1
vote
0answers
53 views

Does smoothing make any sense for Bernoulli Naive Bayes?

I'm trying to understand how the hyperparameters for the Bernoulli Naive Bayes in sklearn work for doing Randomized Search CV. If I use smoothing, and set ...
0
votes
0answers
52 views

Naive bayes losses accuracy/precisionthe bigger the sample

I'm currently using a naive Bayes approach but I ran into a problem regarding the data sampling: the larger the dataset - the worse it starts to perform, even with a training. My features are for the ...
0
votes
0answers
27 views

Comparison of classification algorithms: How can I interpret the results?

I am experimenting on a dataset of about 18,000 articles, 12000 tagged Fake and 6000 tagged Real. I'm building a fake news classifier and I'm comparing 4 classification algorithms: Multinomial Naive ...
0
votes
0answers
21 views

how to classify text that belongs to multiple (possibly missing) categories?

I have a dataframe that is very similar to the classic Reuters News topic classification dataset, and I am interested in ...
0
votes
0answers
38 views

Naive Bayes for classifying columns

Hello StackExchange Community, I have a unique use case for Naive Bayes where I'm trying to train my model to identify output column names based on previous data of input column names. Basically, my ...
0
votes
0answers
38 views

Can you provide an example of 2-dimentaional data about decision boundary

Figure 1 shows a sample data including the two classes. Both logistic regression and Naive Bayes methods can be applied to classify the data without any error. One reason is that there is a gap area ...
0
votes
0answers
114 views

Precision, Recall, Accuracy calculation of Naive Bayes Pairwise combination

I have trained and tested a Naive Bayes model on the emotions found on tweets. One Naive Bayes per emotion is trained and checked which one gave the highest accuracy. Now I have to test whether ...
0
votes
0answers
43 views

Optimize F-Score only for certain classes, disregard other classes

I have a labeled dataset of product reviews where the label is a rating between 1 and 5 and the review is just text. I use a simple naive Bayes classifier (sklearn) to try to predict ratings given a ...
0
votes
1answer
39 views

Using k fold cross validation gives lower results than without using it

I have implemented text classification in the sentence level by following through this tutorial. I have used tf-idf and NB & SVM as shown in the tutorial. The code is working fine with my dataset. ...
2
votes
0answers
75 views

Using Naive Bayes classifier for unsupervised learning

I was going through this article to learn about how the EM algorithm can be used to use the Naive Bayes algorithm for unsupervised learning. Suppose we have the following data without labels: 1 0 1 1 ...
2
votes
0answers
21 views

How to improve Naive Bayes?

I am solving a problem that address this question "What are the Actions that lead to high or low score?" I have the following Data that consist of text and score , I want to derive the words or ...
0
votes
0answers
19 views

Am I right with choosing NB classifier?

I'm a newcomer to ML and Im trying to solve the following problem: I have a text data, namely a set of vacancies names with corresponding requirements descriptions (e.g. [ML specialist]-->[Experience ...
0
votes
1answer
34 views

How to calculate P(X1>X2) using naive bayes? [closed]

Hello I'm struggling with how to calculate P(X1≥X2) using the table and the Naïve Bayes from this question
0
votes
0answers
10 views

Comparing initial symptoms to a diagnosis

I have a small dataset of 80 patients with a diagnosis of 3 types of cancer: AML, ALL, and CML. They each come to the hospital with one or two symptoms: Fever, Diarrhea, or both. They all eventually ...
-2
votes
1answer
28 views

Naive bayes classifier testing vector question

Lets assume that our binary class has five features x1,x2,x3,x4,x5 but the incoming test vector(x1,x2,x3,x4) has only four features .. How would we handle it in the Naive bayes classifier .. Do we ...
2
votes
1answer
132 views

Conditional Independence Example

Is there a canonical example of data which are conditionally independent? In other words, $X_1,\ldots,X_p$ are mutually independent given $Y$. This is the foundational assumption of the naive Bayes ...
1
vote
1answer
178 views

Naive Bayes - Additive Smoothing (or altering/dropping columns) when you get 0 probability

I had an exam recently where we had to train a Naive Bayes model on a given set. The dataset had a column which would give 0 probability for a YES value. I was told later that we were supposed to ...
0
votes
0answers
34 views

Naive Bayesian classifier calculation problem

I am having trouble calculating the Bayesian probability for this table, when doing naive Bayesian classifiers. When I try to calculate number 5 I get $1.25$ by doing the following: $P(a=1|id=1)= \...
0
votes
0answers
13 views

Find words related to high or low score

I am working on text analysis problem. Person X can log in his goals and his actions to achieve his goal. Also their score is calculated based on some formula to measure progress of the goal For ex:...
0
votes
0answers
108 views

Sample Size in Naive Bayes Text Classifier

Hi all I am a new to machine learning. I am trying to use ML to predict the classifications of social media comments from users (text). There are 2 sets of data, data set one includes 5,000 ...
1
vote
2answers
277 views

K-fold cross validation without randomness [closed]

For my research purposes, I am trying to eliminate the randomness in k-fold cross validation. My goal is to conduct cross validation where the first 10% from the dataset is the first fold so that the ...
2
votes
1answer
341 views

In naive bayes, does the independence assumption hold only during marginalization?

I am trying to understand Naive Bayes. One of the principles of this method is to assume independence across features in the datapoints. Given this assumption are two distinct features independent ...
0
votes
0answers
111 views

PCA with Naïve Bayes

I am used PCA with Naïve Bayes but it gives me a bad result, Sensitivity is (AN) ...
1
vote
1answer
97 views

Grid based piecewise-stationary Poisson process test

I'm trying to fit a set of data to a variety of Poisson-based models, and have hit a stumbling block when trying to fit a piecewise-stationary Poisson process. What I mean by this is a Poisson process ...
1
vote
0answers
48 views

use test data set after 10 Cross-validation

I applied 10 Cross-validation but I am a bit confused, I am not sure what is a correct way. 1- Should I apply 10 Cross-validation on all dataset, divide it into 10 folds and sum all the 10 matrices ...
0
votes
0answers
93 views

Interpreting precision vs recall?

I just trained a dataset with a Naive Bayes algorithm and the performance of the model are 64%, 96%, 66% for accuracy, precision and recall. Is it okay to have low accuracy and recall but a slightly ...
0
votes
0answers
270 views

Accuracy increases on decreasing the percentage of training data with stable precision, recall and F-score

I am currently working on a classification problem using tf-idf and Naive Bayes for two classes A and B. I have randomly shuffle the dataset before implementation, and I was experimenting with the ...
0
votes
0answers
259 views

Can someone explain why the multinomial naive bayes classifier is linear?

I don't see how it is possible to write this as a linear function, yet it is said that it is. Can someone please explain how this is possible?
0
votes
1answer
46 views

Naive Bayes - calculation error?

I am trying to do a simple Naive Bayes classification, but I am getting a probability greater than zero. What am I doing wrong? I have included my calculations below. Step 1: Prior. Calculate the ...
0
votes
1answer
162 views

The update of probability distribution given evidence

I've got a problem, which I feel is related to this post. However I cannot really grasp the similarity and adopt it. I am trying to deploy a model for object detection from video. The model outputs (...
0
votes
0answers
416 views

Textblob sentiment analysis, how much do I need myself?

I am trying to do sentiment analysis on tweets using TextBlob library. I trained a NB classifier using test data and test it on another ones. I did not preprocessed the data - I left all shortcuts ...
0
votes
0answers
54 views

Estimating the Kullback-Leibler divergence between exact distribution and its M-projection

My question is quite general. But, I prefer to illustrate it with the actual simple problem I am facing. Suppose that I have a naive Bayesian network (a star-like model). I want to marginalize out ...