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

Filter by
Sorted by
Tagged with
0
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
3
votes
1answer
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. ...
0
votes
0answers
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 ...
0
votes
0answers
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: ...
2
votes
0answers
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]$...
0
votes
0answers
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 ...
2
votes
2answers
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 ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
1
vote
1answer
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 ...
0
votes
0answers
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 ...
2
votes
1answer
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....
1
vote
1answer
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: ...
0
votes
1answer
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: ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
2
votes
0answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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: ...
0
votes
0answers
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-...
0
votes
2answers
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 ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
1
vote
0answers
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 ...
1
vote
1answer
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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_ ...
0
votes
0answers
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 (...
1
vote
0answers
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 ...
2
votes
1answer
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 ...
4
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
0answers
28 views
0
votes
1answer
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 ...
0
votes
0answers
23 views

Multinomial Likelihood function with conditional probabilities drawn from Gaussian Mixtures

I have a Likelihood function that is a multinomial distribution: $p(X | \alpha, \beta) = \prod_{n=1}^N [p(x_n | \alpha)]^{I_n} [p(x_n | \beta)]^{1-I_n}$ where $I_n$ is an indicator function and both $...
1
vote
0answers
18 views

Language Identification Better Results with Unigrams

I have a school project which consists of identifying each language of a tweet from a dataset of tweets. The dataset contains tweets in Spanish, Portuguese, English, Basque, Galician and Catalan. The ...
0
votes
0answers
22 views

Should I use Gaussian naive Bayes or Bernoulli naive Bayes?

My data set looks like following: I have 5 continuous columns in the data set: income, age, experience, money spent/month, and mortgage. I have 5 categorical columns: all categorical (1's, 0's and 2'...
0
votes
1answer
27 views

Document classification with Naive Bayes performs worse than other methods

I am doing a document classification challenge on hackerrank.com. The training data is $X$ strings classified into $8$ classes. My approach is to use word frequencies and naive bayes (...
0
votes
0answers
4 views

Figuring confidence intervals for classification using the variance of categorical random variables

Pronk et al show how to calculate confidence intervals for Bayesian classifications. A key part of their model is the variance of the ratio of two binomially distributed random variables (13). They ...
0
votes
1answer
24 views

Doubt in bayes classifier error calculation

I have recently started machine learning on my own. I started reading Duda art and start book. That author says that Bayes classifier has a min error. He calculates $$\begin{equation} P(error|x)=\...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
2
votes
0answers
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 (...
1
vote
0answers
151 views

Improve F1-score for multiclass text classification with highly imbalanced dataset

I am trying to classify clients' complaints with a dataset of 180k complaints. I have 132 classes like this: Counter({'DIAG_000_NODIAG': 66291, 'FORWARD': 29126, 'DIAG_087': 22843, 'DIAG_049': 17668, ...
0
votes
2answers
65 views

How do I calculate a Maximum Likelihood Parameter Estimate for this binary data - Naive Bayes

I find I best learn by example but I can't seem to find any that match with this, or at most, people appear bizarrely unwilling to show where in these abstract equations you actually insert which ...

1
2 3 4 5
12