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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
0answers
18 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
34 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
16 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
37 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
11 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
19 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
18 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
30 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
24 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
25 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
27 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
36 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
20 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
31 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
57 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
20 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
31 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
23 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
110 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
103 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
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
81 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
231 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
159 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
79 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
90 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
39 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
67 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
190 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
211 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
33 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
129 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
375 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
49 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 ...
0
votes
1answer
78 views

Is it feasible to perform a classification with one feature and Naive Bayes?

My question concerns the feasibility of this classification theoretically and realistically. I mean, if the best performance has been obtained by using only one feature, and adding features degrades ...
0
votes
0answers
18 views

Distributions whose parameters cannot be estimated online

I was doing some additional studying about Naive Bayes classifiers, and asked myself the question: "Why is the Gaussian distribution usually assumed for continuous features?". I immediately thought ...
0
votes
0answers
22 views

How to convert GMM word cluster probability to document class probability

I am trying to predict document class probability. I have trained Gaussian Mixture model which takes in a set of variables (x1, x2, ... xm) belong to a word and spits out the cluster probability.let's ...
0
votes
0answers
26 views

joint probability of a specific event in Bayesian network

I'm trying to solve questions regarding Bayesian network, and now I am wondering if it is possible to prove that the joint probability of specific event (X,A,B) can be calculated by multiply the prior ...
1
vote
0answers
100 views

What attributes to apply laplace smoothing in naive bayes classifier?

I am reading naive Bayes classifier from the book "Data mining practical machine learning tools and techniques". The example of naive Bayes is given using the below dataset. As (Outlook=Overcast | ...
0
votes
1answer
17 views

Tree Augmented Naive Bayes Probability of Attribute Conditioned on Parent and Class

Although this is a similar question, Factored Joint Distribution of Tree Augmented Naive Bayes Algorithm, I need additional clarification. I have training data for two different classes, so it is ...
0
votes
1answer
31 views

Feeding Naive Bayes classification model background statistics prior to fitting

I have a few thousand tagged documents that I use to train a Naive Bayes text classifier (using sklearn in this case). In addition to the tagged documents, I have ...
0
votes
0answers
46 views

gaussian naiive bayes with missing values?

I've got some data that I one-hot encode, A is numbers B is categories, C (the thing that I predict) is categories, so... ...
0
votes
0answers
230 views

R - Naive Bayes 0.5 accuracy

I'm doing a Sentiment Analysis on movie reviews data. The problem I stumble upon is that I'm not able to get an accuracy higher than 0.5. First I've cleaned the data, randomize the data and then I've ...
2
votes
1answer
678 views

Naïve Bayes Theorem for multiple features

I understand the basic principles for the naïve bayes classification with one feature: $$ P(Class|feature) = (P(f|Class) * P(Class)) / P(f) $$ We have a dataset that has the following attributes/...
0
votes
0answers
37 views

Understanding differences between Generative algorithms and Discriminative algorithms with Test Case

I am struggling a bit to understand the differences between a generative model and a discriminative model. From my understanding a generative model tries to predict p(X,Y) and a discriminative model ...
0
votes
1answer
543 views

The purpose of threshold in naive bayes algorithm

Suppose we have 2 classes. By using naive Bayes classifier we get posterior probabilities P(C1|D) and P(C2|D) for query sample.....suppose P(C1|D) is higher than P(C2|D), then we assign the tag of ...
0
votes
1answer
37 views

Confidence of Probability Estimate

What is the difference between increasing the probability estimate a and increasing the confidence of the probability estimate