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

563 questions
Filter by
Sorted by
Tagged with
273 views

### How to derive $p(y = k | x)$ for a class-conditional gaussian bayes model?

If we have a Gaussian model with diagonal covariance matrices and shared variances, how do we expand the equation? We have class labels y = (1, 2...,K) and a vector of D features x = (x1, x2, xD). I ...
24 views

### Missing Value because observation didn't happened

I need help how to deal with missing value to fit logistic regression or naive Bayes. I need to analyze who will likely to purchase the product and I have datasets looks like this. As you can see, ...
3k views

### Naive Bayes with Laplace Smoothing (k = 1)

I used R to predict the event A = "yes" given certain parameters for B1, B2. The results are P(A = "yes"|B1 = "a", B2 = "b") = 0.88. And P(A = "no"|B1 = "a", B2 = "b") = 0.12. But when I did it in ...
5k views

### Poor multiclass classification using Caret in R [closed]

I have 5 continuous variables with 211 rows of data and each row is assigned a region, there are 7 possible regions in total. I wish to build a machine learning model that classifies an unseen row of ...
139 views

### Generate a probabilistic dictionary with naive bayes

I want to make quantitative content analyses with a naive bayes algorithm. The analyses contain 10000 documents. However, I don´t want to encode 10000 documents manually. So the goal is to train the ...
149 views

### Right sequence of events with simple classification (Naive Bayes and Decision Tree)

I'm implementing Naive Bayes and a Decision Tree on the same data, and I need to cross validate with Kfold. Do I have the right sequence of events? Overall, does it make sense or am I ...
1k views

### Is there any relationship between Naive Bayes and Hidden Markov model?

Is there any relationship between Naive Bayes and Hidden Markov model? Can we derive one from another?
522 views

### Matrix dot product in gaussian multivariate distribution

I am having a bit of trouble understanding how the matrix multiplication is carried out in the exponent term of the multivariate gaussian distribution. I am going to call the covariance matrix C. ...
177 views

### Text classification for classes whose probabilities do not add to 1

I have training data that classifies articles (article title and a summary) to one of two classes, let's say class A and class B I want to be able to classify new articles. The problem is, the new ...
55 views

### What set of parameters should I choose for Naive bayes and GBM models so that it creates minimal fitting error?

I understand that different set of parameters has to be chosen for each model so as to avoid under or over fitting. But is there is a 'safe set' of parameters which can be used for the widest range of ...
1k views

### Text classification beginner steps

I've created a data set containing title, abstract and keywords of scientific articles, I ...
650 views

### Using Naïve Bayes to predict disease occurence

I have a dataset concerning patients with information about their diseases and symptoms. I want to estimate probability of $P(disease_i = TRUE|symptom_j = TRUE)$. My intuition is that I should use a ...
123 views

### Bayes classifier problem in §3.1.2 of “Temporal Data Mining” by T.Mitsa

In book "Temporal Data Mining" by T.Mitsa, the problem given to illustrate Bayesian classification consists in the following training set of medical records: ...
4k views

### How to explain low performance of naive Bayes on a dataset

I'm working on a project from Udacity's ml nd, finding donors, I'm making the initial test using three algorithms: LogisticRegression -> RED GaussianNB -> Green AdaBoostClassifier -> Blue This ...
657 views

### How to classify mixed data?

I am trying to do some classification tasks on mixed data set (Hepatitis data set)from UCI ,I will apply SVM and Naive Bayes in R & WEKA, both of them can not handle mixed data directly. Naive ...
30 views

8k views

### Why is the naive bayes classifier optimal for 0-1 loss?

The Naive Bayes classifier is the classifier which assigns items $x$ to a class $C$ based on the maximizing the posterior $P(C|x)$ for class-membership, and assumes that the features of the items are ...
177 views

### equations for removing noisy, indecisive or too rare features from Naive Bayes

I am looking for formulas/equations/criteria that identify which words from the feature set dictionary are noisy/indecisive or too rare. For example, if the dictionary is let's say 5000 words and the ...
2k views

### How can we use Naive Bayes classifier for categorical features? What if some features are numerical?

How can we use Naive Bayes classifier for categorical features? What if some features are numerical?
2k views

### Minimizing False Negatives with Multinomial Naive Bayes

I currently have a problem where I am trying to classify medical abstracts where some are relevant and some aren't. I have tried an SVM, Multinomial Naive Bayes and Random Forest, and found the MNB ...
65 views

432 views

### Online learning algorithm not depending on the order of the data?

Are there any online learning algorithm that do not depend on the order of arrival of the data ? I am looking for algorithms that, given a sequence of data $(x_i,y_i)_{i\in[1,n]}$ : Will produce ...
809 views

### Naive Bayes vs. logistic regression

I'm working with credit scoring models. Here's what I know: Let Y be the binary outcome variable, $Y \in \{0,1\}$ where $Y = 1$ is the outcome of default and $X = (X_{1},...,X_{m})$ be the random ...
79 views

### Text Classification Naive Bayes not working as expected

I am trying to use Naive Bayes to perform text classification. I have two classes A and B. I am mainly interested in identifying class A. Description about the dataset: Some of the text contents ...
790 views

### How to Avoid Overfitting in Spam Classification with Text and Numeric Features

In making a document classifier with scikit-learn, I could easily do so with a straightforward Naive Bayes (NB) classifier like MultinomialNB. However, I also have ...
3k views

In Naive Bayes algorithm, we use $$P(c)P(x_1|c)P(x_2|c)...p(x_n|c)\space\space (*)$$ to decide about the class of a sample $\textbf{x} =(x_1,...,x_n)$. It is possible that for a class $c$, a feature $... 1answer 2k views ### In layman's terms, why is Naive Bayes the dominant algorithm used for text-classification? While I realize choosing the "right" algorithm can vary depending on the task at hand, I'm curious as to why Naive Bayes is quite often used for things like spam-classification or sentiment-analysis. ... 3answers 3k views ### binary and multiclass classifiers I have a simple yes/no problem so I was naturally inclined towards using a binary classifier because I was reading the book, A Course in Machine Learning by Hal Daumé III and I quote from it: [ Binary ... 1answer 7k views ### Laplace smoothing and naive bayes If I want to use naive bayes with laplace smoothing and therefore add 1 to probabilities with the value of 0, what does this mean for probabilities which have the actual value of 1? 1answer 2k views ### Is Naive Bayes becoming more popular? Why? This is the google trends result obtained for "Naive Bayes" phrase from Jan 2004-April 2017 (link). According to this figure, the search ratio for "Naive Bayes" in April 2017 is about %25 higher than ... 0answers 2k views ### Classification on highly skewed dataset I have two classes A and B. 98% of the data belongs to class A and 2% of it belongs to class B. Size of the entire dataset is about 2000. I am interested in correctly classifying all the data points ... 0answers 190 views ### Multinomial Naive Bayes: Should we club (combine) infrequent feature-categories? Let's say we are using multinomial naive bayes to perform a classification task based on ONE categorical feature. As an example, the categorical feature could be a "Store-ID" and each training ... 1answer 2k views ### Naive Bayes and independence In every example I see(spam, negative vs positive tweet , weather study...) there is always the assumption that the input features (or variables) are independent. In order for me to be able to ... 2answers 4k views ### what is the “learning” that takes place in Naive Bayes? As I recall algorithms like nearest neighbor don't build a model based on training data and then apply that model to test data. It just takes each new instance and compares it to all the data to find ... 1answer 40 views ### What sort of analysis method is most appropriate for computer monitoring data that includes samples at a given time? I'm interested in what sort of modelling is best suited for data that includes samples collected at different times. My use case is to do with computer monitoring, so for the initial case assume that ... 2answers 913 views ### How to use TFIDF-vectors with Multinomial Naive-Bayes? Say we have used the TFIDF transform to encode documents into continuous-valued features. How would we now use this as input to a Naive Bayes classifier? Bernoulli naive-bayes is out, because our ... 0answers 514 views ### Gaussian Naive Bayes sensitive to feature scaling I'm using a GNB algorithm. As to my knowledge it should be insensitive to feature scaling. However, when I standardize (z-score) or normalize (min-max scaling) those of my features that have a very ... 0answers 557 views ### Classifiers for small data sets and low dimensional features? I have a small data set (under 100 samples) and 5 input features. I often hear about how neural networks are prone to overfitting under such conditions and that naive Bayes is likely to underfit. ... 2answers 75 views ### Text detection, Naive Bayes: How to rate results? Is there a way to rate the results provided by Naive Bayes algorithm? I mean, if NB detects "I love to play football" and label it as "tennis", is there a way to improve the detection by saying to NB ... 1answer 36 views ### Need suggestion/guide on how to estimate unknown bayesian priors Suppose I can only observe people who visit Starbucks. My posterior probabilities will be like$\Pr(\text{male} \mid \text{visits Starbucks})$,$\Pr(\text{has hair} \mid \text{visits Starbucks})\$, ...
277 views

I'm trying to do text detection thanks to Naive Bayes Algorithm. If I teach my tool: "Football is a great hobby" and assign it to the label "football", I'm totally fine with it detecting "I play ...