# Questions tagged [naive-bayes]

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".

556 questions
Filter by
Sorted by
Tagged with
11 views

### Bayes classifier expected classification error for multiclass case

Assume a feature $x \in [a,b]$ and two classes $\omega_1, \omega_2$ with prior probabilities $P(\omega_1), P(\omega_2)$ and likelihood functions $p(x | \omega_1), p(x | \omega_2)$. Then, the expected ...
6 views

### Feature engineering of closely related text

I am trying to do multi class classification of text. For many reasons I can't paste the data, atleast now in open. The problem is there is a text of closely related subjects like Anatomy and ...
8 views

### How does sample_weights work in Naive Bayes?

I want to use the sample_weights parameter in sklearn Naive Bayes classification. I have seen online that it can be used to balance data but I have also seen that it can be used to weight data with ...
56 views

### Naive question about Naive Bayes modeling

In Naive Bayes classifiers, one calculates a frequency table to determine a prediction. A classic example, one calculates the frequency table of words given the context of spam or ham. E.g. ...
26 views

### How does Naive Bayes treat a missing class

Fist of all, I am Naive Bayes virign so apologies if it sounds too naive but I couldnt find anything on the internet for this. Somebody implemented Naive Bayes for us and I want to understand its ...
14 views

### How do I calculate the probability error given a conditional distribution and its prior?

Suppose you have a single feature x, with the following conditional distribution: ...
56 views

### Graphical representation of Bayes decision boundary

Here is my problem statement: Let $X=(X_1,X_2)∈[0,1]×[0,1]$ and $Y∼Bernoulli(p=X_1⋅X_2)$. Plot the Bayes decision boundary ${(x1_,x_2):P(Y=1|X=(x_1,x_2))=0.5}$ and indicate the regions in $[0,1]×[0,1]$...
9 views

### What is the function of the denominator in the likelihood estimation equation (used in naïve bayes classifiers)?

I understand that the likelihood is calculated/estimated by looking at the number of instances where a certain feature and class occur together divided by the total instances of that class. However, I ...
120 views

### Why don't we estimate the prior in a Naive Bayes' classifier?

I'm currently studying the textbook Introduction to Machine Learning 4e (Ethem Alpaydin) the brush up on my ML basics and had a question regarding a part w.r.t. using the Naive Bayes' classifier in ...
18 views

### What are the classifiers that can be used for sequence data?

I've been going through the classifiers like Naive Bayes, Decision Tree etc. I've a sequence data like so ...
14 views

### Does Central Limit Theorem have anything to do with Bayesian Inference? [duplicate]

I am studying Central Limit Theorem and Bayesian Statistics and got a question that which or what part in Bayesian Statistics the concept of Central Limit Theorem is applied. If so, I'd like to know ...
26 views

### difference between Conditional Random Fields(CRF) and Naive Bayes

I am working through the course Probabilistic Graphical Models. A CRF calculates the conditional probability distribution, i.e P(Y | X1, .., XN). The following picture shows an example how the CRF is ...
14 views

### is it possible to apply Glove with MultinomialNB?

When I try to do mnb = MultinomialNB() mnb.fit(train_glove_features, train_targ) I get the below error: ValueError: Input X must be non-negative I do ...
30 views

### Do we ever take the log of a probability like we do with likelihoods?

I am trying to learn about naive Bayes by implementing a simple naive Bayes model to classify the titanic dataset (so a binary classification). To keep it simple for now I am just including the two ...
23 views

### Use different Naive Bayes classifiers to target different data

I am practicing using the Naive Bayes classifier to predict whether people get a stroke or not, but, I am confused with two classifiers. One is categorical Naive Bayes, another is Gaussian Naive Bayes....
37 views

### Does Gaussian Naive Bayes have paramter to be tuned

I am trying to implement the Gaussian Naive Bayes from a scikit-learn library. I know that the Naive Bayes is based on the Bayes' theorem which is defined in high level as: ...
21 views

### What classifier could predict spam/ham labels for SMS messages better than Naive Bayes?

I have 7000 SMS messages, 6000 ham, 1000 spam. Typical messages are: ...
34 views

### Bayes Theorem and Neural networks

For example, I have MNIST dataset and a trained neural network: input image and the output is a probability distribution over 10 classes. I show image and prediction is: 5% for each class and 55% for ...
12 views

### What is the difference between the class v and the hypothesis h? Some dumb example needed

In this example, the labels are "no/yes" which are enough to perform a Naive Bayes. But if i perform a Bayesian optimal classifier so P(v|x,D) = sum_h_of P(v|h,D) * P(h|D) with v the label ...
10 views

### Could someone guide me on how to obtain the general result of the percentage if the Principal components belong mostly to an open-eyed person?

Good morning. Excuse me, I'm asking for advice on the following problem: I generate the following Principal Components. Principal components labeled 1 belong to the alpha waves of an open-eyed person ...
20 views

### How to prepare the training data for Support Vector Machine?

I'm currently doing some comparison of Naive Bayes Algorithm and Support Vector Machine classifying news to see each algorithm's accuracy. I already know how to prepare the training data for Naive ...
9 views

### What goes wrong in linear regression if we assume a Naive Bayes model when features aren't necessarily independent?

In the notes I'm working through, it says that in low dimensional models, it's often the case that we cannot get away with assuming that features are uncorrelated/independent i.e. that we can't use ...
16 views

### Bayes Classifier example: is my work right? What does it mean?

I have this dataset and I am learning about Bayes Classifier. After data cleaning, I have tried to use Bayes classifier on it. I used R with this code: ...
16 views

### Reduce dimensionality and classify EEG signals

Good morning, I am new to machine learning, if someone could recommend a book to reduce dimensions (PCA), and classify (Naive Bayes), the purpose is to classify EEG signals, I have already applied pre-...
46 views

### Naive Question: Naive Bayes vs Common Sense

Do you know the classical problem of sunny / rainy / overcast days and output yes / no the game will played. See the image below. Now the problem question is "Players will play if weather is sunny. Is ...
19 views

### Naive Bayes : intuition that resampling (down/up/SMOTE/ROSE) affects prior probabilities in a wrong way

I have a supervised classification problem with unbalanced class to predict (Event = 1/100 Non Event). I have the intuition that using resampling methods such as down/up/SMOTE/ROSE with Naive Bayes ...
19 views

### Classification Models! How to chose? [duplicate]

I am trying to transition into the Data Science field and and very curious about getting as much practical and theoretical knowledge as possible. Is there any resources that can help with identifying ...
46 views

### How to combine Naive Bayes and Logistic Regression?

I am working on an NLP binary classification problem. I trained a model with linear regression and a naive Bayes classifier. I found out that I am getting a good recall value in linear regression but ...
77 views

### What advantages does Naive Bayes have over the “not naive” Bayes?

Repeating the question What advantage does Naive Bayes have over "not naive" Bayes? Considering the fact that the assumption about conditional independence is often violated, why do we make it? As ...
35 views

### Why is MLE used in Naive Bayes to estimate parameters if it's a frequentist approach?

Something that confuses me a bit. I thought, MLE was a frequentist method. But as far as I understand, wen can estimate the parameters of Naive Bayes using MLE. How come MLE is used in a Bayesian ...
61 views

### How can I replicate the process sklearn calculates the posterior probabilities?

I have a question pertaining to scikit-learn methods. Can I get the same probabilities obtained with predict_log_proba() by hand calculating the likelihoods and prior obtained with feature_log_prob_ ...
32 views

### How to distinguish Multivariate Bernoulli Distribution from Binomial Distribution,Multinoulli distribution,Multinomial distribution?

Ok While studying naive Bayes I came across this question and from the accepted answer I reach to this blog. While reading this blog I got a clear idea of how Bernoulli distribution turns to (...
35 views

### Correcting a naive Bayes classifier based on the performance on the training dataset

I'm sorry, this seems like something that's already been discussed to death, but I don't seem to be able to phrase the question right to find the answer. Say I have a naive Bayes spam filter trained ...
27 views

### Why to use log while calculating probability of an email being spam?

I worked on a basic spam email project (Naive Bayes classifier with Laplace smoothing). In source code, to calculate probabilities of spam or ham, log of the final result is being used. Why is it ...
35 views

### Making naïve Bayes less naïve by accounting for mutual dependence

I'm playing with the pet example of figuring out the probability someone has the flu given certain symptoms, namely fever and nausea. Let's define our priors, considering the "probability of x" as ...
78 views

### How is Laplace Smoothing used in this example of Binary classification in Naive Bayes

I am following CS229 course by Andrew Ng. On this lecture note it talks about using Laplace smoothing to bypass situations of 0-probabilities. What does not make sense is the immediate jump to the ...
43 views

### What is a good accuracy for Naive Bayes Classifier?

I'm currently train the Naive Bayes Classifier in TextBlob for my Sentiment Analysis. Before I used the training I had many positive or negative sentences that were determined as neutral sentences, so ...
28 views

### How to compute co-occurence probability from a co-occurence matrix?

I have a co-occurence matrix in this format: ...
67 views

### Bayes Classification vs Naive Bayes Classification

Generally, known that Bayes Classifier is optimal for the probability of error. But when I did some experiments: First Case: I have 2 classes data and their covariance matrices correlated in this ...
23 views

17 views

### Naive Bayes Assumption formal definition

I am reading Andrew Ng's lecture notes available at http://cs229.stanford.edu/notes/cs229-notes2.pdf on Naive Bayes assumption. He writes For instance, if y = 1 ...
28 views

### Bayesian AB Testing: Simulated vs analytically derived posterior

Consider the problem of distributing two leaflets A and B to increase sales of a given product. We distribute 20 of leaflet A (with 8 successes) and 20 of leaflet B (with 3 successes). We know want to ...
37 views

### Classification ML for sports betting

I'm trying to model the problem on my own and I just want to have feedback if I'm on the right track. Suppose I want to build a model that outputs the decision rule for the outcomes of a football (...