The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
1
vote
1answer
31 views

Why is $p(y|x)$ infeasible when discussing Naive Bayes?

This is a question in which I think I am missing some key information. When discussing Naive Bayes, I've noticed that lecturers typically say that we really want is $p(y|x)$ (label given features), ...
0
votes
0answers
7 views

Which Naive Bayes Classifier fits best for categorical data? [closed]

Which Naive Bayes Classifier would you choose to fit data with two categorical variables and a class variable? weather=['Sunny','Sunny','Overcast','Rainy','Rainy','Rainy','Overcast','Sunny','Sunny', ...
1
vote
1answer
24 views

Bayes and Naive Bayes code implementations

I know that Bayes classifier assigns the new data point $\pmb{x}$ to the class $\omega_j, \ j=1,\dots,M$, when $p(\omega_j \mid \pmb{x}) = \max_{q=1,\dots,M}p(\omega_q \mid \pmb{x})$, where $p(\...
0
votes
1answer
27 views

How normal is the following distribution of data? [closed]

I'm using the following dataset with 2 columns (features) and 1 label to train a Gaussian Naive Bayes classifier. How would you determine (using a stastiscal normality test) whether the data is ...
0
votes
1answer
22 views

Tuning for Naive Bayes

If you are tuning a Naive Bayes model using caret, can someone explain how increasing or decreasing the Laplace smoother and bandwidth impact the results? I ...
0
votes
0answers
20 views

Difference between a Bayes classifier with diagonal multivariate gaussian class conditionals and a Naive Bayes classifier?

In a Bayes classifier, let's say we want to fit a multivariate Gaussian distribution for the class-conditional probabilities and we restrict its covariance matrix to be a diagonal matrix. In a Naive ...
1
vote
3answers
42 views

Accuracy, Sensitivity, Specificity, & ROC AUC [duplicate]

In the context of predictive modeling, when comparing clasification models, What statistic should be considered more important over the others: Accuracy, sensitivity, specificity, or area under ROC ...
0
votes
1answer
28 views

Maximum likelihood: Bernoulli

I would really appreciate if anyone you can explain how it went from step 1 to the answer provided below. This is from the book Doing Data Science by Cathy O'Neil and Rachel Schutt pages 101 to 102. ...
0
votes
0answers
10 views

How to use densities for Naive Bayesian classification?

This is a simple question I think. I am using the following R package for non parametric naive Bayesian classification: https://www.google.co.uk/amp/s/rdrr.io/a/cran/naivebayes/man/...
1
vote
0answers
64 views

Naive Bayes for Categorical Features (Non Binary)

How do i use Naive Bayes Classifier (Using sklearn) for a Dataset considering that my feature set is categorical, ie more than 2 categories per feature are present. I've looked everywhere, some ...
0
votes
0answers
17 views

Computing Gaussian Naive Bayes

I am not more of a mathematics person, I am trying to learn but I could not break the math down. Here is the data set I am using I wanted to use Gaussian Naive Bayes to find our whether the gender ...
0
votes
0answers
19 views

R: Naive Bayes model e1071, why does it works with totally different columns in training ad testing?

I'm working with the e1071:: naiveBayes() function, but I don't figure out how it works. My doubts arose when I read this post. I've posted this question on SO, but ...
0
votes
0answers
22 views

Mixture of Multinomials

I have implemented a Naive Bayes Model for a mixture of independent Bernoulli. Where the conditional probability can be written as: $\mathbb{P}(Y=j | X) \propto \omega_{j} \prod_{i=1}^{d} \mu_{i, j}^{...
0
votes
0answers
22 views

Conditional Probability Given Multiple Priors

Reference: ilanman Oct 3, '16 at 13:27. Even though years old, this discussion is relevant to my current interests. The P(Ai|B) in the last formula above, reverses the position of the posterior and ...
1
vote
1answer
21 views

Bayesian repeated updates, likelihood functions with different nature

Let's say we have a prior probability of some diseases 'D'. Then we have some data and likelihood function of symptoms (S) P(S|D) and we update priors. Then we have age (A) likelihood function P(A|D) ...
0
votes
0answers
8 views

In-depth explanation of the multinomial Bayes classifier

I am new to machine learning and am trying to understand the different classifiers. I have searched the internet and books for a comprehensive explanation of the Multinomial Bayes classifier, but I ...
0
votes
0answers
17 views

Decision boundary for categorical Bayesian network

I know that categorical Naive Bayes (categorical predictors, binary target) has a linear classification boundary. I'm wondering what the decision boundary for an arbitrary categorical Bayesian network ...
2
votes
1answer
43 views

Updating a probability with additional knowledge. Bayes Theorem

I am quite confused with using Bayes theorem for the following problem. And I am not sure it can be applied at all. I have a football website data with user views. Each view corresponds to a specific ...
0
votes
1answer
18 views

Size of training in Naive Bayes

I just started getting involved with Machine Learning and I decided to create a spam filter for my social app, using the Naive Bayes classifier. I'm following this guide: https://hackernoon.com/how-to-...
0
votes
0answers
30 views

What is to be done when PDFs are not Gaussian/Normal in Naive Bayes Classifier

While analyzing the data for a given problem set, I came across a few distributions which are not Gaussian in nature. They are not even uniform or Gamma distributions(so that I can write a function, ...
0
votes
1answer
33 views

Jurafsky and Martin (2018) Do not understand formula in naiye bayes classifier

Currently I am reading Language and Speech Processing by , Chapter 4 Naiye Bayes and Sentiment Classification. At page $7,$ when the authors discuss worked example. Data set is as follows: Training ...
0
votes
0answers
6 views

What are the relationships among Markov Property, Stationarity, and Time Invariance

I am wondering if there is or are any relationship among those. I have understood Markov Property by reading Wikipedia, but it is still confusing to figure out if there is any relationship among those ...
0
votes
1answer
41 views

Can anyone help to explain one of the variables in a figure that illustrates how posterior probabilities shift and move around?

I am learning this post. The book gives this figure to illustrate how posterior probabilities shift and move around Here is the code ...
1
vote
0answers
15 views

Which distribution should I use for Naive Bayes algorithm(Gaussian or Rayleigh)? What to do with categorical data?

I am predicting whether credit card application of an individual would be approved or not given his/her credentials. I have the following dataset: The variable descriptions are as follows: I need ...
3
votes
2answers
51 views

What is the meaning of generating data from a probabilistic model such as a naive bayes classifier?

I am studying probabilistic modeling but I am stuck with the concept of generating data from the probabilistic model. Say I have built a naive bayes classification model, what is the point of ...
0
votes
1answer
55 views

Hoes does laplace smoothing in Naive Bayes control high bias and high variance?

I'm trying to understand how laplace smoothing exactly helps to balance between overfitting and underfitting. I know that Laplace smoothing is used as a fail safe probability if there's a any ...
-1
votes
1answer
54 views

Bayesian Formula for multiple events

I know that Bayesian Formula for A giving B is like this $ p(A | B) = \frac{p(B|A) p(A)}{p(B)}$ In case there are multiple events B C D What will the equation be like in the simplest form of a ...
0
votes
0answers
15 views

To say my model is a stochastic model,what assumptions do I need to make?

I am trying to understand what a stochastic model is and assumptions to be able to say my model is a stochastic model. I am new to it, so I may confuse you. I have gone through Markov chain, Markov ...
0
votes
0answers
3 views

How to determine the discount percentage of a product for a given product category and brand?

We are performing the analysis of data of an online shopping site. Please refer to the dataset mentioned in this link The fields of the dataset are: We have been asked to do the following: Perform ...
0
votes
0answers
15 views

Is Chow Liu's scoring algorithm to have at most one root node?

I am told that Chow Liu's algorithm can have at most one root node. In the fisr place what does it mean? I am wondering how I can apply Chow Liu's scoring function for more than one root node to do a ...
0
votes
0answers
15 views

What is the difference between Bayesian Network and Dynamic Bayesian Network?

I just got the sentences below from a web site while studying Bayesian Network: "​A dynamic Bayesian network (DBN) is a Bayesian network extended with additional mechanisms that are capable of ...
0
votes
2answers
51 views

In Naive Bayes classifier how is P(sneezing,builder|flu) = P(sneezing|flu)P(builder|flu)?

Please refer to this literature: According to Naive Bayes classification algorithm: $P(\text{sneezing},\text{builder}\mid\text{flu}) = P(\text{sneezing}\mid\text{flu})P(\text{builder}\mid\text{flu}) ...
0
votes
0answers
23 views

Why can logistic regression always outperform naive Bayes for every conditional distribution?

We know that the generative model assumes that $X_i \perp X_{-i}| Y$; while the discriminative model assumes that $p(Y=1|x; \alpha)=\frac{e^{\alpha_0+\sum_{i=1}^n\alpha_ix_i}}{1+e^{\alpha_0+\sum_{i=1}^...
1
vote
0answers
34 views

Naive Bayes linearity [duplicate]

By theory I know that Naive Bayes Classifier is a linear one, but when I implemented the decision boundary it was a curve (not linear as shown below). Is there any explanation why this is happening? ...
0
votes
1answer
34 views

How valid is this Stacking Model (input features to weak learners are different)?

I have a set of features with 6 of them being categorical, 1 continuous and 2 textual in type. I have to predict the labels ( 10 in number) for them. I tried applying several models and came to a ...
1
vote
1answer
112 views

Counting frequencies in Multinomial Naive Bayes

I have noticed some ambiguity/inconsistency in how various authors calculate the p(word|label) estimate in Multinomial Naive Bayes. In some cases, this value is calculated by counting words without ...
0
votes
2answers
51 views

Derivation of the formula for the probability of a class, given conditionally independent attributes

The following is a formula that finds the posterior probability of a class (i.e. yes or no) given four conditionally independent attributes: $$P(c|X) = P(x_1|c)\cdot P(x_2|c)\cdot P(x_3|c)\cdot P(x_4|...
1
vote
1answer
20 views

Calculating priors with large number of classes

I'm trying to classify users into ~1K different groups. I'm trying to build a MAP classifier and have estimated my prior and posterior distributions using large amounts of data. The issue that I've ...
1
vote
1answer
130 views

Gaussian Naive Bayes Classifier

There are three nice Bayes classifier techniques: Bernoulli, Multinomial, and Gaussian If we have a dataset whose samples have continuous-valued features, then Gaussian Bayes Classifier is used. In ...
2
votes
0answers
30 views

Determining the decision boundary for Naive Bayes

I'd like to know if this is a sensible idea and if there exist any already formed methods to do this (I'm new to the data science area). Essentially, I have used Naive Bayes to accurately classify ...
0
votes
1answer
33 views

manual implementation of Gaussian naive bayesian returns posterior larger than 1

I try to implement Gaussian naive bayesian manually in R. I test my model on iris data set. I would like to build a predictive model. That is, I would like to ...
1
vote
1answer
63 views

Naive bayes computation of denominator

I'm wondering about the denominator in this computation : ...
0
votes
0answers
67 views

Naive bayes example by hand

Given the following data ...
0
votes
0answers
14 views

Naive Bayes missclassification rate across classes

I have a dataset with income, age sex and education as categorical features. I used R to create a Naive Bayes classifier as follows: income ~ age + sex + education. I got the following a-priori and ...
0
votes
0answers
17 views

Why is it easier to incorporate arbitrary features into discriminative models?

It is often stated, that when arbitrary features are implied, generative models (e.g. Naive Bayes) are a lesser fit than discriminative ones, mainly for being harder to build. How would you elucidate ...
2
votes
1answer
50 views

Classification with ONLY categorical data

Suppose I have a table with some factor characteristics of some plants. For instance, petal color, pollen color, and so on. What is the best way to classify that data? Is it feasible to use some of ...
0
votes
1answer
30 views

Are there useful applications for Bayes Nets (vs. Naive Bayes)?

I am trying to learn about Bayesian networks and try to make them work in the context of a simple prediction problem. But my question is more theoretical: For argument's sake, assume we have a ...
0
votes
1answer
15 views

How to make a prediction with Bayes Classifier after computing MLE?

I'm trying to figure out the role of computing the MLE for classification/prediction purposes with the Bayes Classifier. Let's say I'm given a set of data assumed to be Gaussian. I can then compute ...
1
vote
1answer
31 views

How to validate classification model with ordinal information

I have a Naive Bayes model that predicts 3 classes. As you increase each class it means that the condition is more severe. 0 means no condition, 1 is concern and 2 is that they have the condition. I ...
0
votes
0answers
44 views

Why do the posterior probabilities violate the axioms of probability when we apply Bayesian update without likelihood computation?

Suppose that the unknown parameter $\Theta$ is Bernoulli and we make $n$ observations $X_1,X_2,\ldots,X_n$, which are continuous random variables. Assuming that $X_1,X_2,\ldots,X_n$ are conditionally ...