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

Prediction Model for Naive Bayes Multi-Class Classifiers

I've been using Naive Bayes for multi-class classifications, but I'm curious what's actually happening mathematically. I have had difficulty finding a straightforward mathematical explanation online. ...
0
votes
0answers
24 views

Performing Naive Bayes Calculations with Continuous Features

I am working on this homework problem and am not sure how to handle continuous features in a Naive Bayes classifier. I know the outputs for the categorical variables are simple to compute, for example:...
1
vote
0answers
61 views

What does it mean to train a Naive Bayes classifier for categorical features?

I know that Naive Bayes classifiers can be trained for both categorical and continuous (using a Gaussian distribution) features. I am less certain of how these two classifiers would differ. What does ...
0
votes
0answers
19 views

Performance loss after applying SMOTE

I'm working on a classification problem, and I've an unbalanced dataset, so I applied SMOTE algorithm in order to balance it. While I got an increased performance when working with classification ...
0
votes
1answer
15 views

why do we need to apply Laplace smoothing in naive base to all the words in text classification?

I understood that we need to apply for Laplace smoothing to the words that are not present in our training data. But then why/ what is the need to do Laplace smoothing for all the words(even the words ...
0
votes
1answer
33 views

Marginal Likelihood in the Bayesian Posterior Formulation

What do we mean by "Integrating out the parameters" in Marginal likelihood? Particularly in the posterior formula. The marginal likelihood in a posterior formulation, i.e P(theta|data) , as ...
0
votes
0answers
9 views

How to approach non-deterministic synthetic event generation?

Context: I'm working on a problem to generate hurricanes, earthquakes, and the like for a video game on a semi-realistic time scale. I probably want to amplify the number of events generated a bit ...
0
votes
0answers
20 views

Relation between the Naive Bayes Classifier and GAM

Problem: This problem is about establishing a connection between the Naive Bayes Classifier and GAM. Consider a classification problem with J classes. Let $f_j (X), X ∈ ℝ^p$, be a density function for ...
1
vote
1answer
30 views

How can I apply naive Bayes classifier for three classes (Positive, Negative and Neutral) in text data?

I found a naive Bayes classifier for positive sentiment or a negative sentiment Citius: A Naive-Bayes Strategy for Sentiment Analysis on English Tweets. But with most available datasets online, ...
10
votes
2answers
302 views

Confusion about 1- vs 2-tailed tests for feature selection by hypothesis testing

Suppose $x_i\ (i=1,2,...,N)$ be attribute values for $N$ samples from class $W_1$ with mean $\mu_1 $ and $y_i\ (i=1,2,...,N)$ be attribute values for $N$ samples from class $W_2$ with mean $\mu_2 $. ...
1
vote
1answer
22 views

How do I quickly calculate a Bayes classifier?

With the data from this post I want to quickly answer the following exam question: Given that it is rainy, not windy, the temperature is hot and humidity is normal, should you play golf or not? Show ...
0
votes
0answers
43 views

The probability is proportional to the probability that the message is normal?

I was watching this Youtube video on Naive Bayes. The creator begins by using the example of an email spam filter to illustrate how Naive Bayes works. At 5:47, the narrator says that, technically, the ...
0
votes
0answers
4 views

How to Choose Class for Naive Bayes Classifier with Same Posterior Probabilities?

For Naive Bayes classifier in multiple class, I know that we had to choose a class with the highest posterior probabilities. I'm doing project using Naive Bayes classifier method and when i calculate ...
0
votes
0answers
18 views

Why does using conditional random field avoid independence assumption

I am reading Daphne Koller's book on probabilistic graphical models under the topic of conditional random fields. One of the advantages in using CRF is that we can avoid modelling the correlations ...
1
vote
1answer
159 views

How is this a “Bayes classifier”?

I am currently studying the textbook Learning with kernels: support vector machines, regularization, optimization and beyond by Schölkopf and Smola. Chapter 1.2 A Simple Pattern Recognition Algorithm ...
0
votes
0answers
26 views

naive bayes classifier with Exponentially distributed likelihood with big parameter

Just for the practice of it, I'm trying to do a naive Bayes classifier for data which has exponential distribution for the likelihood function, i.e. $X_k=x|Y=1 \in Exp(\lambda_k)$ where $k = 1,..., p$ ...
0
votes
0answers
6 views

Should I normalize the data? [duplicate]

I have four int columns with two of them having a value in 10s, and the other two have it in 100s. Should I, for the ease of applying the following algorithms, normalise the data, or would it not have ...
4
votes
1answer
145 views

$\frac{P(x_1 \mid y, s = 1) \dots P(x_n \mid y, s = 1) P(y \mid s = 1)}{P(x \mid s = 1)}$ indicates that naive Bayes learners are global learners?

I am currently studying the paper Learning and Evaluating Classifiers under Sample Selection Bias by Bianca Zadrozny. In section 3. Learning under sample selection bias, the author says the following: ...
1
vote
1answer
27 views

Applying Bayes rule in the context of reinforcement learning [duplicate]

I was watching this video on reinforcement learning. At 1:28, it says following: $$Pr(s'|a,z,s)=\frac{Pr(z|s',a,s)Pr(s'|a,s)}{Pr(z|a,s)}$$ I was unable to get how this was obtained. I pondered a bit ...
0
votes
0answers
18 views

In which cases GNB is worse than logistic regresion?

I am training and testing two models on the same dataset: a logistic regression and a gaussian naive bayes (sklearn's with the default parameters). The dataset is the ...
1
vote
1answer
176 views

MLE and MAP with Naive Bayes

From what I understand, Naive Bayes classifies by doing: $$ y \leftarrow argmax_{y_k}P(Y=y_k)\prod_{i}P(X_i|Y=y_k) $$ There are two things there we need to know: $P(Y=y_k)$ and all the $P(X_i|Y=y_k)$ ...
0
votes
0answers
51 views

Number of parameters to calculate in Naive Bayes with and without independence assumption

I am just getting started with trying to understand the theory behind Naive Bayes a bit. $Y$ = boolean-valued rv $X_i$ = boolean-valued rv (part of random vector $\vec{X}$). From what I understand, we ...
1
vote
0answers
19 views

Applying Bayes for treating binary soft classification model output as marginal probabilities

Consider a soft classification model $f: x \to (0,1)$, with $Z = f(X)$. Now say that the model evaluates in testing data yields, as shown in the figure below, the distributions conditioned on the true ...
1
vote
1answer
81 views

How can I handle null or missing values in a Naive Bayes classifer where all the predictor variables are categorical nominal

My data set has: 20 categorical nominal predictor variables, each variable has on average 5 distinct possible values 1 dependent binary class variable to be predicted by the Naive Bayes classifier ...
0
votes
1answer
38 views

Bayes Classifier - Monte Carlo sampling

Assume a feature $x \in [0,2]$ and $3$ classes $\omega_i, \, i = 1,2,3$ with likelihood functions $p_1 = \frac12, p_2 = \frac34 x (2 - x), p_3 = \frac12 x $ and decision regions: $$ \begin{align} R_1 ...
1
vote
1answer
125 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
8 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
36 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
92 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
31 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
18 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: ...
3
votes
0answers
156 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
12 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 ...
3
votes
2answers
311 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
20 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
16 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
66 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
55 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
33 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
27 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
365 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
43 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
36 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
14 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
11 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
21 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
1answer
27 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
56 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
2 3 4 5
12