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

1
vote
0answers
27 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
14 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
26 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
18 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 (...
0
votes
0answers
13 views

How can I improve the accuracy of a naive Bayes classifier?

I am training an ML model to correctly classify observations with either a 0 or 1 label. The data has over 40,000 features. I selected a subset of the features that performs well using sure ...
2
votes
1answer
41 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
15 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
18 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 ...
0
votes
0answers
22 views

Sentiment Analysis Naive Bayes vs Logistic Regression

I am doing some sentiment analysis on Twitter data, and I wanted to compare a Naive Bayes Classifier and a Logistic Regression classifier as to if their performance is affected by spell checking the ...
0
votes
0answers
29 views

Naive bayes feature selection RStudio

I have created a wrapper using forward selection method to test each feature as they are added to the response variable in naivebayes function R to determine the accuracy and error. The predictor ...
2
votes
1answer
50 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
40 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
22 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
548 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
22 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
67 views

When can a feature independence assumption be reasonable and when not?

For example, Naïve Bayes assumes that the features are conditionally independent and they perform really well. Is there a time when assuming features are conditionally independent not so reasonable? ...
0
votes
0answers
17 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
369 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
26 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
53 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
128 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
19 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
201 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
24 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
45 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
83 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
79 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
18 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
20 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
134 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
94 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
29 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
22 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
59 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
63 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
212 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
82 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 ...
0
votes
1answer
46 views

Using k fold cross validation gives lower results than without using it

I have implemented text classification in the sentence level by following through this tutorial. I have used tf-idf and NB & SVM as shown in the tutorial. The code is working fine with my dataset. ...
2
votes
0answers
108 views

Using Naive Bayes classifier for unsupervised learning

I was going through this article to learn about how the EM algorithm can be used to use the Naive Bayes algorithm for unsupervised learning. Suppose we have the following data without labels: 1 0 1 1 ...
2
votes
0answers
22 views

How to improve Naive Bayes?

I am solving a problem that address this question "What are the Actions that lead to high or low score?" I have the following Data that consist of text and score , I want to derive the words or ...
0
votes
0answers
19 views

Am I right with choosing NB classifier?

I'm a newcomer to ML and Im trying to solve the following problem: I have a text data, namely a set of vacancies names with corresponding requirements descriptions (e.g. [ML specialist]-->[Experience ...
0
votes
1answer
40 views

How to calculate P(X1>X2) using naive bayes? [closed]

Hello I'm struggling with how to calculate P(X1≥X2) using the table and the Naïve Bayes from this question
0
votes
0answers
10 views

Comparing initial symptoms to a diagnosis

I have a small dataset of 80 patients with a diagnosis of 3 types of cancer: AML, ALL, and CML. They each come to the hospital with one or two symptoms: Fever, Diarrhea, or both. They all eventually ...
-2
votes
1answer
43 views

Naive bayes classifier testing vector question

Lets assume that our binary class has five features x1,x2,x3,x4,x5 but the incoming test vector(x1,x2,x3,x4) has only four features .. How would we handle it in the Naive bayes classifier .. Do we ...
2
votes
1answer
169 views

Conditional Independence Example

Is there a canonical example of data which are conditionally independent? In other words, $X_1,\ldots,X_p$ are mutually independent given $Y$. This is the foundational assumption of the naive Bayes ...
1
vote
1answer
251 views

Naive Bayes - Additive Smoothing (or altering/dropping columns) when you get 0 probability

I had an exam recently where we had to train a Naive Bayes model on a given set. The dataset had a column which would give 0 probability for a YES value. I was told later that we were supposed to ...
0
votes
0answers
36 views

Naive Bayesian classifier calculation problem

I am having trouble calculating the Bayesian probability for this table, when doing naive Bayesian classifiers. When I try to calculate number 5 I get $1.25$ by doing the following: $P(a=1|id=1)= \...
0
votes
0answers
14 views

Find words related to high or low score

I am working on text analysis problem. Person X can log in his goals and his actions to achieve his goal. Also their score is calculated based on some formula to measure progress of the goal For ex:...