Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
0answers
10 views

When to use BayesianSearcCV and how it works?

Can somebody highlight when to use BayesianSearchCV and how it works? I have seen the implementation of same on kaggle and wanted to explore it further. Below is the link where the implementation ...
1
vote
3answers
48 views

Why did Logistic regression perform better than svm? [closed]

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 tried different ML algorithms and found that Logistic regression out ...
2
votes
1answer
22 views

Looking for other opinions on approach to classification problem

I'm looking to implement an "opt-out" filter for my company. The input is short, text-message style messages. A few examples of opt-out messages are: "remove me from your list" "remove from list" "...
0
votes
0answers
22 views

Very low probability in naive Bayes classifier 1

I have some training data (TRAIN) and some test data (TEST). Each row of each table contains an observed class (X) and some columns of binary (Y). I'm using a Python script that is intended to predict ...
1
vote
1answer
18 views

Naive Bayes Classifier - Discriminant Function

To classify my samples, I decided to use Naive Bayes classifier, but I coded it, not used built-in library functions. If I use this equality, I obtain nice classification accuracy: ...
3
votes
2answers
73 views

Avoiding the zero problem

I have a dataset and I'm trying to predict the label for my sample but I couldn't map it since that case never showed here is my sample (I'm using naïve Bayesian method) X=(Age=middle, has_job=false, ...
2
votes
1answer
121 views

How does Naive Bayes classifier work for continuous variables?

I know that for categorical features we just calculate the prior and likelihood probability assuming conditional independence between the features. How does it work for continuous variables? How can ...
1
vote
3answers
44 views

Classifier for large number of labels

I have a merchants dataset with 800,000 samples and 18,000 labels. Each sample is associated with a single label and the labels are independent. An example sample looks like ...
1
vote
2answers
36 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{...
2
votes
1answer
112 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?
3
votes
2answers
133 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
14 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
51 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 ...
5
votes
4answers
161 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
33 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
230 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
52 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: ...
1
vote
0answers
30 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
68 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 ...
2
votes
0answers
183 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
182 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
106 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
1answer
184 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
89 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
38 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
25 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
45 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
587 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
101 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
24 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
1answer
222 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
424 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
68 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
266 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
146 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
40 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
22 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
542 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
126 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
119 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 <...
2
votes
1answer
2k 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
31 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 ...
0
votes
1answer
36 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
415 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
83 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
334 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 ...
4
votes
1answer
4k 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
599 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 ...