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

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

0
votes
0answers
29 views

Bayes Rule Bayesian Risk and Decision

Good day, When attempting this problem I came across some difficulties. A humanitarian charity wishes to classify a village as being at either high or low risk of flooding. The following ...
0
votes
0answers
10 views

naive bayes text classification: can I look at the individual word probabilities?

Assume I use the Naive Bayes classification algorithm. My question is simple: can I rank the words according to their posterior probabilities? I want to have a measure of "importance" of the words in ...
-1
votes
0answers
16 views

Understanding MLE for a Gaussian Naive Bayes classifier

I am trying to develop a text classifier and I'm reading about MLE to help me understand the process. I came across this example: and I wanted to try this myself. I'm running into a problem and so ...
1
vote
1answer
31 views

Naive Bayes Classifier Unclear

I read the following sentence regarding the Naive Bayes Classifier: If large number of features have relatively minor effects, taken together, their combined impact could be quite large. Could ...
1
vote
0answers
17 views

Measuring the contribution of word to a classification in a Naive Bayes document classifier

I have a multinomial Naive Bayes document classifier. I'm interested in knowing the contribution made by each word to a single classification. That is, I'd like to be able to measure which words in ...
0
votes
0answers
20 views

Measure Naive Bayesian Classifier certainty and error of prediction

So I am fairly new to this so please be patient :) I am using Naive Bayesian Classifier to find the probability of a class (Yes), then I use this probability in another process. Now I am being asked ...
2
votes
2answers
63 views

Understanding the parameters needed for a distribution in Bayes networks?

Since I have a discriminative mindset hardly can I intuit the so-called parameters needed to specify a distribution in a generative Bayesian Network. I'd like to borrow an example from this blog. If ...
0
votes
2answers
41 views

Maximum likelihood in Naive Bayes classifier

With regards to the Naive Bayes classificator, I have read the following in Wikipedia and wanted to know why it is like that: "In many practical applications, parameter estimation for naive Bayes ...
1
vote
0answers
24 views

Naive Bayes and kNN accuracy

Assume that a large number of binary features are added to a dataset with two class labels c1 and c2, such that for each added feature f, the class conditional probability P(f = 0|c1) = P(f = 0|c2). ...
0
votes
1answer
18 views

What is the interpretation for the priors in the derivation of Laplace smoothing?

Laplace smoothing has a generalisation that can be justified with the use of Bayes formula. Let $f(x;\alpha,\beta)$ be the (non-normalised) beta distribution, i.e. $$f(x;\alpha,\beta) = x^{\alpha-1}(...
0
votes
1answer
24 views

Bernoulli distribution/ SOME probability/conjugate prior

I would like to know what "SOME probability of seeing tail" means in the second answer here. I.e. how much is it? EDIT: I do not understand how can I see that there is SOME probability of seeing Tail ...
1
vote
3answers
102 views

Random Forests performs far less better than Naive Bayes

In one of my Machine Learning courses I have to find the best predictor for this dataset and its binary target "Caesarian". First of all, I tried to improve the datas : there are few features. I did ...
0
votes
1answer
47 views

Naïve Bayes vs Bayes classifier

While studying the naive Bayes classifier, two questions came to mind: When (if this can happen) is the naive Bayes classifier equivalent to the Bayes classifier? Why do I usually read in textbooks ...
0
votes
0answers
16 views

Intuitive logic behind Naive Bayes and Bayes Theorem. Why does Naive Bayes multiply/input prior probability twice?

In order to calculate Naive Bayes, we combine prior probability with test evidence and obtain posterior probability. When calculating test instance, we combine the probability of the test with the ...
0
votes
1answer
92 views

R Naive Bayes and Laplace: Even turned off, works fine with unseen words in test data?

I'm trying to better understand Laplace+1 smoothing on Naive Bayes for text classification. Using the e1071 package in R, naiveBayes() function, I get some confusing results. If I fit a model using ...
2
votes
0answers
38 views

My roc is low while precision and recall are high.Why is it so?

I bulit a naive bayes classifier from 60k vectors of text and each of the text is a 2000 dimension vector(Used bag of words for vectorization). Used simple cross validator to find the best alpha and ...
1
vote
1answer
15 views

When will Naive Bayes misclassify continuous training instances?

For the discrete case, we can say that Naive Bayes might misclassify training data due to things like the zero-frequency problem. Why might Naive Bayes misclassify continuous training data?
0
votes
0answers
36 views

Naive Bayes where posterior almost always equals prior (in MATLAB)

I have trained a naive Bayes classifier in MATLAB using fitcnb (description link) and 11 variables, seven of which are numeric (normal) and four of which are categorical ("mvmn" distribution name). I ...
0
votes
0answers
22 views

Why is my version of naive bayes not working as well as the one from sklearn?

I've implemented my own version of the bernoulli naive bayes algorithm. However, its performance is not as good as the sklearn version. Could anyone explain how I can improve my code? ...
0
votes
0answers
23 views

possible to identify (2 or more) phases (left/right step) with SVM?

I am new to the field of machine learning and I am trying to create a tool which is able to identify if a left or a right step is performed on a wearable sensor which consists out of 3 sensors (...
2
votes
1answer
144 views

Why does Naive Bayes work better when the number of features >> sample size compared to more sophisticated ML algorithms?

According to this article Because of the class independence assumption, naive Bayes classifiers can quickly learn to use high dimensional features with limited training data compared to more ...
0
votes
0answers
16 views

Classifying web pages into page type accurately

I'm trying to classify webpages as either "login", "registration/create an account", "contact us", "forgot password" for example. My approach is the following: Obtain plaintext of the page (just the ...
0
votes
0answers
42 views

Accuracy Measure for Bayesian Network

I was trying with INSURANCE data in bnlearn. For measuring the model accuracy, I tried with different nodes for prediction. With each node, the prediction shows different accuracy rate. So, my doubt ...
3
votes
1answer
157 views

Should PCA be (always) done before Naive Bayes classification

According to Wikipedia page on Naive Bayes: .. Naive Bayes classifiers are a family of simple "probabilistic classifiers" based on applying Bayes' theorem with strong (naive) independence ...
1
vote
0answers
42 views

Exploit grouped features for a classification problem

I've got a dataset of 100.000 labelled vectors, each one with a set of 100 binary features: $$F = \{ f_{1}, f_{2}, ..., f_{100} \}.$$ I am able to build a Bernoulli Naive Bayes classifier for ...
0
votes
0answers
37 views

When coding categorical predictors as dummy variables for a Naive Bayes classifier, should the reference levels be left out?

Perhaps another way of putting the question would be: "Do Naive Bayes classifiers have intercept terms?" My statistical training tells me that a predictor with $k$ categories should be coded as $k-1$ ...
1
vote
0answers
19 views

Review 5-stars Multiclassification Model

So I'm super new to DataScience World. And I'm Trying to do a TextMining Work. My goal is by reading user's reviews to predict their rating to a tech product. Problem? Multiclassification model with ...
2
votes
2answers
552 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
35 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
20 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
494 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
27 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 ...
3
votes
1answer
75 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
195 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
21 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
422 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
25 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
49 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
95 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
93 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
29 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
22 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
161 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
106 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
32 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
23 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
86 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
81 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
246 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
99 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 ...