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
0answers
16 views

Improve F1-score for multiclass text classification with highly imbalanced dataset

I am trying to classify clients' complaints with a dataset of 180k complaints. I have 132 classes like this: Counter({'DIAG_000_NODIAG': 66291, 'FORWARD': 29126, 'DIAG_087': 22843, 'DIAG_049': 17668, ...
0
votes
2answers
42 views

How do I calculate a Maximum Likelihood Parameter Estimate for this binary data - Naive Bayes

I find I best learn by example but I can't seem to find any that match with this, or at most, people appear bizarrely unwilling to show where in these abstract equations you actually insert which ...
0
votes
2answers
63 views

what is the difference between Naive Bayes and NON-Naive Bayes?

In Naive Bayes Why is it necessary for Naive to assumes that the input features are independent and not co-related . can anyone explain with a very simple example on what is the problem of events ...
0
votes
0answers
9 views

Conditional independence of attributes in NB algorithm and independence of levels in Target Encoding

This is not an actual question but I really need what you are thinking about it. I have an advisor, not pretty much knowledgeable about Machine Learning/Deep Learning and Statistics. While we were ...
0
votes
1answer
36 views

“Variance is independent of class” assumption

Reading from Logistic Regression slides by Erdem, before deriving the linear boundary equation from the GNB equation it says "What if we assume variance is independent of class i.e. $\sigma^2_{i,0}=\...
0
votes
0answers
83 views

Which Naive Bayes model to use for data converted to dummy?

I have a dataset which has a mix of caterogrical and numerical variables. After filling in the missing data (imputing it with most common occuring value) i then convert my data into dummy e.g the ...
0
votes
1answer
16 views

NaiveBayes: Adding a new predictor which is random noise

In the NaiveBayes method, can adding a random noise vector where each element is sampled from, e.g., a standard normal distribution, help? In what cases this may be a 'clever' approach? I imagine ...
1
vote
1answer
13 views

How can I show Naive Bayes Classifier is using Maximum a Posterior?

I understand how Naive Bayes' Classifier is working and I also understand Maximum a Posterior but what I don't understand is the connection between Naive Bayes' Classifier and Maximum a Posterior. I ...
1
vote
1answer
18 views

Is there a way to know what features a Multinomial Naive Bayes classifier is taking into account to predict categories?

I have created a Multinomial Naive Bayes classifier. The dataset looks like this: ...
0
votes
0answers
13 views

NB or linear SVM for text Classification

I'm trying to compare the time complexity of the NB and the linear SVM when using them for text classification but can't find out a response to what to use considering that the number of features is ...
0
votes
0answers
22 views

Naive Bayes - why MAP?

According to Wikipedia on (Classic) Naive Bayes The naive Bayes classifier combines this model with a decision rule. One common rule is to pick the hypothesis that is most probable; this is known ...
5
votes
1answer
69 views

Implication of marginal independence of features for classification

This question is a follow-up to my earlier question on naive Bayes (NB) classification. The example we're considering is that of spam classification, in which an email is classified as spam ($S \in \{...
3
votes
2answers
44 views

Naive Bayes calculation

I was following along with an example given here in which we are trying to classify emails as spam ($S \in \{0, 1\}$) based on the occurrence of the words "buy" ($B \in \{0, 1\}$) and "cheap" ($C \in \...
0
votes
0answers
10 views

How can a multinomial naive Bayes classifier be used here?

I'm doing a problem from a textbook where the data (found here) are students and the features include sex, family size, health, age, etc. The problem asks to make a naive Bayes classifier from scratch ...
0
votes
0answers
10 views

multi class text classification with multiple dependent variable to one set of predictors in r

I am doing multi class classification in text in r on a dataset containing two columns; feedback and topics. Some feedback has been assigned to more than one topics and some more than two but most of ...
2
votes
0answers
59 views

When to use KNN and when Naive Bayes algorithm

Trying to get clear guidelines on when we should use KNN and when Naive Bayes but not getting anything. The indication I am getting is KNN is a lazy learner and NB is used to spam/ham classification ...
0
votes
0answers
10 views

which better Naive Bayes using Cross Validation or without Cross Validation?

I am the beginner in machine learning and just found out about cross-validation in the algorithm. I build a system that used a Naive Bayes algorithm to classify the activity driving. and now I'm still ...
1
vote
0answers
45 views

Building a Classification model for predicting Customer Churn

I am currently building a Customer Churn Prediction model and the project is in the process of development of models. The client has given data till Sep 2019 and wants to check if the model is able to ...
0
votes
1answer
48 views

How do I split the data using repeated cv?

I am working on a coursework and I have the following task: Formation of training and test sets in R using the methods below: • Repeated CV for Bagging type classifier • Repeated CV for Stacking ...
0
votes
0answers
23 views

What does prediction mean in Bayesian Network and how can I make predictions in Bayesian Network?

I am currently working on a Bayesian Network(1 parent node, 2 children nodes, for example) and want to do predictions on my Bayesian Network. Conditional probabilities are all set and I wonder the way ...
0
votes
1answer
20 views

logic behind balancing? [duplicate]

I am a newbie in stats, and while reading: https://towardsdatascience.com/having-an-imbalanced-dataset-here-is-how-you-can-solve-it-1640568947eb I don't seem to understand why is an imbalanced ...
0
votes
0answers
13 views

How come I get 0 recall?

I am doing multinomial naive bayes for the first time; code: ...
0
votes
0answers
11 views

Assumptions of Logistic Regression and Naive Bayes Classification Problems

Am trying to understand the difference between assumptions to follow for Logistic Regression and Naive Bayes. As per my knowledge both Naive Bayes and Logistic Regression should have features that go ...
0
votes
1answer
18 views

Naive Bayes bias derivation

I am following this course (notebook) and I wonder about how this derivation of the Naive Bayes came to be. So, there is a $X$ defined to be the term frequency matrix between documents (rows) and ...
1
vote
0answers
12 views

Improving the Naive Bayes classifier performance through decorrelation?

I was wondering if it is possible to improve the performance of the Naïve Bayes classifier by decorrelating the data. The Naïve Bayes assumes conditional independence of the features given some class $...
0
votes
0answers
16 views

Choosing standard deviation of prior in Bayesian linear regression model

I was wondering how to choose the best standard deviation for a Bayesian linear regression model given a set of training points so the fitted model closely matches the true function.
0
votes
0answers
13 views

could someone please give more explanation the difference on sequential mode and batch mode in the context of naive Bayes?

in Neural networks, there are 2 concepts, batch learning and sequential learning. Page 75 of "Kevin Patrick Murphy. Machine Learning: A Probabilistic Perspective." uses these terms in naive Bayes ...
0
votes
0answers
31 views

Parameter of CountVectorizer(min_df=10, ngram_range=10,max_features=5000)

vectorizer = CountVectorizer(min_df=10, ngram_range=10,max_features=5000) I understand what these parameters are and I know what it does, but I still have few question on these parameters (i.e. ...
0
votes
1answer
9 views

classifying of naïve Bayes classifiers is to choose a $y_k$ to maximize the multiplying (joint probability), is my understanding correct?

this CMU Machine Learning Course says (naïve Bayes classifiers) classifying is just a matter of multiplying together those selected parameter estimates that happen to match the values of my new ...
0
votes
0answers
18 views

How to find the most important features in Multinomial Naive bayes using feature_log_prob_ and coef_ attributes

I'm stuck in finding the most important features in MultinomialNaiveBayes for all columns(categorical+numerical+text) using feature_log_prob_ and coef_ attributes respectively.I'm able to do with ...
0
votes
2answers
75 views

Naive Bayes + KDE = Lazy?

If I in Naive Bayes use Kernel Density Estimation to estimate logarithms of the conditional probabilities of the attributes in each class $\ln p(x_j|C_k)$ can we consider this classifier to be an ...
0
votes
1answer
103 views

Multi class classification using Naive Bayes

I have components basically divided into two main categories. AWS and Azure. For eg: ...
0
votes
0answers
26 views

Naive Bayes: why not to compute the likelihood probability directly? [duplicate]

A Bayes classifier assigns to an observation $X$ the class $Y$ that maximizes: $P(Y|X) \varpropto P(Y)P(X|Y)$ I wonder why not to estimate both $P(Y)$ and $P(X|Y)$ directly from the training data ...
1
vote
0answers
39 views

What is the relationship between these 2 formulas in the context of naive Bayes classifier?

In "Kevin Patrick Murphy. Machine Learning: A Probabilistic Perspective." (p. 83 in the book / p. 114 in the pdf) the author gives this formula to train a naive Bayes classifier: $$p(\mathbf{x}_i,y_i|...
1
vote
1answer
66 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), ...
1
vote
1answer
39 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
30 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
69 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
120 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
107 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
33 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
13 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
175 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
22 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
30 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
27 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
25 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
28 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
17 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
23 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 ...

1 2 3 4 5 11