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-classifier]

Naive Bayes classifiers makes the naive assumption that the features are independent. They make use of Bayes theorem.

1
vote
2answers
19 views

Naive Bayes Classifier

Could someone please explain to me how and why can we go from equation $4.3$ to equation $4.4$: $$\hat{c}= \arg\max_{c \in \mathcal{C}}P(c|d) = \arg\max_{c \in \mathcal{C}}\frac{P(d|c)P(c)}{P(d)}\tag{...
1
vote
2answers
35 views

Effect of outliers on Naive Bayes

Are Naive Bayes algorithms affected by outliers in the data? Suppose there is a data set, does one need to remove outliers before applying Naive Bayes?
1
vote
1answer
33 views

How does the naive Bayes classifier handle missing data in testing?

Assume that a classier has been trained already (no missing training data), but a prediction has been requested based on an observation that does not include every feature. How can we handle this ...
1
vote
0answers
9 views

Dealing with missing n-grams in Naive Bayes classifier

I am doing sentiment analysis on code-mixed text data, i.e English used interchangeably with another language. The dataset I currently have is very small in size, approx 3.5k samples. I am sure that ...
1
vote
0answers
24 views

My naive (ha!) Gaussian Naive Bayes classifier is too slow

I am trying to build a film review classifier where I determine if a given review is positive or negative (w/ Python). I'm trying to avoid any other ML libraries so that I can better understand the ...
4
votes
4answers
135 views

Is the prediction algorithm absolutely the same for all linear classifiers?

Is the prediction algorithm absolutely the same for all linear classifiers and linear regression algorithms? As known, any linear classifier can be described as: ...
1
vote
0answers
19 views

One class naive bayes

I have to build one class naive Bayes method for outlier detection based on the likelihood probabilities. I tried to create it using sklearn GaussianNB but it is for multiclass classification. Is ...
0
votes
0answers
7 views

Identifying causation between content <> ad kpis

I have a bunch of content tagged with various types of content (e.g. political news, sports, opinion etc.) and a bunch of kpis related to ads placed next to this content (e.g click-throughs, purchases ...
0
votes
1answer
68 views

How to calculate Accuracy, Precision, Recall and F1 score based on predict_proba matrix?

I found this link that defines Accuracy, Precision, Recall and ...
0
votes
1answer
34 views

Naive bayes, all of the elements in predict_proba output matrix are less than 0.5

I've created a MultinomialNB classifier model by which I'm trying to label some test texts: ...
0
votes
0answers
12 views

How to measure uncertainty and prediction errors for a naive Bayesian Classifier?

I have a small dataset of 30 rows and 5 columns (4 features and 1 class). The classifier is used to give the likelihood of occurrence of an incident. thus, the class variable gives the probability of ...
1
vote
1answer
25 views

test accuracy of text classification is too less

I have a data set of movies and their subtitles.My task is to classify them based on their ratings-[R,NR,PG,PG-13,G].I have 13 examples for each class. I preprocessed the subtitles in the following ...
0
votes
0answers
15 views

Optimizing multinomial naive bayesian classification for large sets of text

I have a set of scientific papers that I'm wanting to classify into a number of categories. I have tagged documents to use as training and test data. I've been experimenting with multinomial naive ...
0
votes
0answers
21 views

How to Compute Multinomial Naive Bayes likelihood

I'm following this tutorial to implement a Multinomial Naive Bayes classifier to categorize text documents. It works to identify 1 single class, but how could I get the likelihood of a sample to be of ...
0
votes
0answers
23 views

R caret naïve bayes accuracy is null

I've tried to get an answer on stackoverflow, but I think that data science is more specialized. I have a single dataset to train on with SVM and Naïve Bayes. The SVM works, but Naïve Bayes doesn't ...
0
votes
0answers
5 views

Intuitive logic behind Naive Bayes and Bayes Theorem. Why does Naive Bayes multiply/input prior probability twice?

In order to calculate Naive Bayes, we combine prior probability with test evidence and obtain posterior probability. When calculating test instance, we combine the probability of the test with the ...
2
votes
0answers
75 views

Sentiment Analysis Naive Bayes vs Logistic Regression [closed]

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 ...
2
votes
1answer
77 views

Collinearity and Outlier Removal

I am playing with a credit fraud detection dataset at Kaggle. An imbalanced dataset with about 0.1% of fraud transaction. The features are 28 PCs out from a PCA exercise done by the data publisher + ...
0
votes
1answer
55 views

How can one use a validation set to reduce overfitting Naive Bayes?

What is the correct procedure for using a validation set to reduce overfitting? Say I split the data 80:10:10 (training: validation:test). I train on the training set then get 90% accuracy. I apply ...
1
vote
0answers
120 views

How to deal with missing data for Bernoulli Naive Bayes?

I am dealing with a dataset of categorical data that looks like this: ...
1
vote
0answers
66 views

Laplacian smoothing on Class Probability (Naive bayes)

I am implementing a Naive Bayes classifier in Python from scratch. The instructions I have asks that I incorporate Laplacian Smoothing with K=1 to computing the probability that a message belongs to a ...
2
votes
1answer
34 views

Predict the corresponding value in one column using a list of values found in another column

Please have a look at this link. This was a question I asked few months back and after some suggestions and exploring I was able to successfully use TFIDF along with MultinomialNB classifier to pretty ...
2
votes
0answers
23 views

Conditional Probabilities on store data

I have data on store level purchases, Panel-level purchases and demographic information of loyalty cards. In the store purchases information, the data consists of a product code which can be assigned ...
1
vote
0answers
44 views

Multiclass naive bays classification as probabilistic model

I have a model based on Naive-bays classifier (multinomial Naive bays) that i have fitted on data set with just one feature ( categorical observation) and a label : observation ; label funny ...
6
votes
3answers
490 views

Why does the naive bayes algorithm make the naive assumption that features are independent to each other?

Naive Bayes is called naive because it makes the naive assumption that features have zero correlation with each other. They are independent of each other. Why does ...
1
vote
1answer
67 views

Is there an API to extract questions and labels from yahoo answers?

I want to work on a ML project which involves the family and relationship category from yahoo answers. I want to extract questions from yahoo answers (only the title) with the label as the category it ...
0
votes
1answer
23 views

Bayes Classifier as a general model

Is it correct to argue that the Bayer Classifier is an ideal classifier, which is taken as a model by every other implemented classifier?
5
votes
0answers
173 views

How are ANN's, RNN's related to logistic regression and CRF's?

This question is about placing the classes of neural networks in perspective to other models. In "An Introduction to Conditional Random Fields" by Sutton and McCallum, the following figure is ...
4
votes
2answers
366 views

Naive Bayes for SA in Scikit Learn - how does it work

Okay so i scrape data from the web on movie reviews. I also have already got my own 'dictionary' or 'lexicon' with words and their labels (1-poor, 2-ok, 3-good, 4-very good, 5-excellent). SO the ...
2
votes
1answer
55 views

Doubt in interpretation of Bernoulli Naive Baeyes Algorithm

We say Bernoulli naive bayes assumes gaussian distribution of all continuous features. What happens if I have categorical features also in the dataset? What type of prior transformation in data is ...
2
votes
3answers
211 views

Naive Bayes Multinomial, independence assumption misunderstood

This is embarrassing but I think I miss understand something. In multinomial distribution, "while the trials are independent, their outcomes X are dependent because they must be summed to n." wiki ...
2
votes
2answers
140 views

Algorithms and tools for ranking text as a job description

We're working on a ranking texts by degree of the similarity to vacancies. We have 4-year data set (≈1M texts) of custom search feeds from social network. We also have vacancies (≈30K) manually ...
1
vote
0answers
38 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 a rating given a ...
1
vote
0answers
18 views

Processed data cannot build Naive Bayes Classifier model

Having preprocessed data using weka supervised cfssubseteval forward and backward selection, the decision tree model builds and makes prediction well, but naive Bayes do not recognize the same Arff ...
2
votes
1answer
189 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 ...
2
votes
1answer
99 views

Why is spam detection a classification problem and not a class modelling problem

Trying to get my feet wet with machine learning on text. The most common dataset I've seen in this space is the sms dataset with classes ham and spam. And the most common and successful approach ...
2
votes
0answers
103 views

When to use Multinomial Naive Bayes?

I am working on a text classification problem, and plan on using Naive Bayes based model. In which cases should I consider using Multinomial Naive Bayes?
1
vote
1answer
33 views

Why do classes with fewer words have higher probability?

Given that I have a word that does not occur in any of my documents: newword, and given that I have two classes: class1 and <...
0
votes
0answers
4 views

Preprocessing arff data

After preprocessing my data using attribute selection CfsSubsetEval and GreedyStepwise in my own code then generate new arff file of preprocessed data. The Naive Bayes algorithm cannot build while ...
2
votes
1answer
1k views

How does ,the Mutlinomial Bayes's alpha parameter, affects the text classification task?

I would like to know how the alpha parameter, in Multinomial Bayes, affects the text classification task. I know that this parameter is correlated to the algorithm'...
1
vote
0answers
29 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 ...
-1
votes
0answers
83 views

How Can I use Naive Bayes after applying LDA in Spark?

The goal of my project is to classify with the help of LDA topic model. First, I need to apply LDA and then apply a Naive Bayes or any other classification algorithm on LDA topics to classify ...
0
votes
1answer
35 views

Should I remove features that occur very rarely to build a model?

I am trying ML techniques in language processing. I have got 3000 short texts and I extract features(words and phrases) from all of them and build a vocabulary. I end up with 6000 od features and most ...
4
votes
1answer
359 views

Can feature importance change a lot between models?

I have a random forest classifier and Multinomial Naive Bayes. For feature importance, I used gini index for random forest and for Multinomial Naive Bayes I used the coefficients of each feature. Then ...
1
vote
0answers
70 views

How can I create a “trained” dataset for categorizing news articles?

I am trying to automatically categorize news articles according to their primary topics, i.e. Politics, Entertainment, Sports, Business, Technology, Health, etc. There are some labeled datasets out ...
2
votes
1answer
315 views

Text Mining with Naive Bayes

I'm implementing prediction code for courses of computing fields using Naive Bayes classifier. The output is to predict whether the course is (management, design, database, analysis,…9 classes). I ...
2
votes
1answer
3k views

Difference between Bernoulli and Multinomial Naive Bayes

Here is my understanding of the difference between a Bernoulli and a Multinomial Naive Bayes: Bernoulli explicitly models the presence/absence of a feature, whereas Multinomial doesn't. Is there ...
2
votes
1answer
549 views

Feature importance parameter in machine learning models like Naive Bayes

Sorry for vague heading for the question. My question is that, is there any way to compare features (or attributes) used in machine learning algorithm? I have used Naive Bayesian classifier for binary ...
1
vote
0answers
46 views

Training with feature metadata - bayesian network (naive bayes) [closed]

I am building a project for fun - reverse astrology! I am making a dataset like: ...
7
votes
1answer
154 views

Understanding of naive bayes: computing the conditional probabilities

For a task on sentiment analysis, suppose we have some classes represented by $c$ and features $i$. We can represent the conditional probability of each class as: $$P(c | w_i) = \frac{P(w_i|c) \cdot ...