Questions tagged [naive-bayes-classifier]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
21 views

What is different between R2 and mean of R2 in multiclassification probelm? Which one is correct?

I have a question. I have a big dataset (unfortunately confidential). What I did? I have trained my model with Naive-Bayes. ...
-1
votes
0answers
14 views

How to prevent underflow when calculating probabilities with the Naïve Bayes Classifier algorithm? [closed]

I'm working on a Naïve Bayes Classifier algorithm for my data-mining course, however I'm having an underflow problem when calculating the probabilities. The particular data set has ~305 attributes, so ...
0
votes
0answers
14 views

Is it better using decision tree or naive bayes or any other suggestion? [closed]

I want to do a classification using machine learning for data with label, but i need to prioritize accuracy and i am afraid that with small data decision tree will overfitting it and cause the ...
0
votes
0answers
35 views

ValueError: dimension mismatch [closed]

I am training a spam sms classifier using the UCI data set on kaggle as follows: ...
-1
votes
1answer
20 views

How to calculate the “Evidence” for Naive Bayes text classification?

I'm trying to write a Naïve Bayes text classification from scratch in Python, but I can't quite grasp what I should do to write the actual classifier. One question that popped up was: "What ...
1
vote
0answers
12 views

Minimum number of features for Naïve Bayes model

I keep on reading that Naive Bayes needs fewer features than many other ML algorithms. But what's the minimum number of features you actually need to get good results (90% accuracy) with a Naive Bayes ...
2
votes
1answer
34 views

How to apply MultiOutputClassifier to a dataset for Naive-Bayes algorithm

I have a dataset which is as follows, (it's taken from an article online and I have been trying to Naive Bayesian algorithm on it) Original Dataset y attribute After having done some manipulations (...
0
votes
2answers
535 views

ValueError: y should be a 1d array, got an array of shape (1045, 5) instead [closed]

I have just started Python and working on training models. The task that I have been assigned is to train a dataset named "austin_Weather" Original Dataset y attribute After having done some ...
1
vote
2answers
32 views

Bag-of-words and Spam classifiers

I implemented a spam classifier using Bernoulli Naive Bayes, Logistic Regression, and SVM. Algorithms are trained on the entire Enron spam emails dataset using the Bag-of-words (BoW) approach. ...
0
votes
0answers
13 views

How does the SciKit-Learn version of Naive Bayes optimize its prediction?

I am working on implementing a Naive Bayes Classifier for sentiment analysis from scratch following the example given in Jurafsky's book. When evaluating the performance of my version of the ...
0
votes
0answers
10 views

Directional Naive Bayes for Python

I'm working on classification with word embeddings that are compared using cosine similarity. I wanted to use Naive Bayes classifier, and since I want to compare embedding on the unit circle, I though ...
1
vote
1answer
14 views

Discovering important topics in corpus of text using metadata and text content

I am working on a system to classify documents into important/non-important. I have a large (200,000) sample set of documents which have been pre-labelled and using Naive-Bayes I have achieved 95% ...
1
vote
2answers
51 views

How much data do you need to build a classifier?

I would like to ask you what a good size of dataset would be for building a classifier. I know that there are datasets of 1000 obs and datasets of 1m obs. But I also read papers where classifiers were ...
0
votes
0answers
16 views

Hypothesis Space of Bayes' Optimal Classifier?

What is the hypothesis space for an Optimal Bayes' Classifier and why do the assumptions of a Naive Bayes' Classifier (that features are conditionally independent of each other) narrow the search ...
1
vote
0answers
12 views

Destination prediction with Naive Bayes and sparse output matrix

Given a dataset of historical cab rides, I'm trying to predict the final zip code destination of a ride based on the following features: origin zip code (e.g. 10006 Wall Street, Manhattan) pickup ...
1
vote
0answers
15 views

Use predicted data to improve Multinomial Naive Bayes model for text classification [closed]

For a small project, I am making use of Naïve Bayes Multinomial Model to do some text classification. It has shown some very promising results, especially since I don't have a lot of Training data. ...
2
votes
1answer
70 views

How to improve results from a Naive Bayes algorithm?

I am having some difficulties in improving results from running a Naive Bayes algorithm. My dataset consists of 39 columns (some categorical, some numerical). However I only considered the main ...
2
votes
1answer
70 views

Naive Bayes Denominator clarification

I came across an earlier post that was resolved and had a follow up to it but I couldn't comment because my reputation is under 50. Essentially I am interested in calculating the denominator in Naive ...
0
votes
1answer
24 views

Binary classification: how to transform features in real numbers?

I want to train a binary classification algorithm for spam detection using labeled data set. The dataset has the following features: ...
0
votes
2answers
83 views

Reduce the risk of numerical underflow

We use log-likelihood (called as lambda) to reduce the risk of numerical underflow (in context of sentiment analysis using Naive Bayes). What does "reduce the risk of numerical underflow" ...
0
votes
1answer
38 views

Classifiers and accuracy

I would like to ask you how to use classifier and determine accuracy of models. I have my dataset and I already cleaned the text (remove stopwords, punctuation, removed empty rows,...). Then I split ...
3
votes
1answer
107 views

How to classify a new email as spam/not spam?

I am working on a small exercise for determining if an email is spam or not. My dataset is the following: ...
0
votes
0answers
31 views

Why does Multinomial Naivebayes fails/poor results for continous data like iris dataset?

i'm confused as to why MultinomialNB will give poor accuracy as we're using the same formula for calculating the probability i.e finding of count of x for particular class divided by count of all ...
0
votes
1answer
266 views

How to make use of POS tags as useful features for a NaiveBayesClassifier for sentiment analysis?

I'm doing sentiment analysis on a twitter dataset (problem link). I have extracted the POS tags from the tweets and created tfidf vectors from the POS tags and used them as a feature (got accuracy of ...
1
vote
0answers
57 views

TFIDF and TFIDF weighted W2V with Multinomial Naive Bayes?

Although the tfidf vectors don't really follow Multinomial Distribution, yet MultinomialNB works fairly well, why is it so? Also would weighted tfidf w2v work the same way or should I use GaussianNB ...
1
vote
0answers
48 views

How to use a Multinomial Naive Bayes Classifier on different sets of data?

I am working on a sentiment analysis project involving tweets. I used a Kaggle dataset to train my model for sentiment analysis and want to use that trained model to predict the sentiment on an ...
1
vote
0answers
31 views

how to convert feature_log_prob_ to exponential feature importance for BernoulliNB

I am using BernoulliNB classification for problem ...
1
vote
1answer
44 views

Why do we add “αd” to N in Laplace Smoothing?

I just started to learn Naive Bayes algorithm. Then I learned to use Laplace smoothing to avoid getting probability of zero. I understand the purpose of using it, but, in the expression of Laplace ...
1
vote
1answer
144 views

Naive Bayes always predicting the same label

I have been trying to write a naive bayes classifier from scratch that is supposed to predict the class label of the nominal car.arff dataset. However the classifier always predicts the most common ...
1
vote
1answer
43 views

How Calculate Effect (percentage) label of the input variables on the output variable by BernoulliNB

a description problem below. I have 10 words like X1 , X2 , X3 , ... , X10 and three Label like short , long , hold. My problem is that how calculate Effect (percentage) label of the input variables ...
0
votes
1answer
84 views

Naive Bayes vs Full Bayes model classifiers

I have a hard time to understand when Naive Bayes works better than Full Bayes. In general, i know that naive bayes does the assumption that features are independent given the class. However, if ...
1
vote
0answers
34 views

Handling multiple data types in Naive Base

I was studying about NB Classifier and it came out to me that i can use Bernoulli NB or Multinomial NB for categorical variables ...
1
vote
1answer
53 views

Probability of Gaussian Naive Bayes

How would I go about attaching a probability to the prediction outputted by a Gaussian Naive Bayes model ? I'm asking because the predict_proba function U can use with sklearn's Gaussian Naive Bayes ...
0
votes
1answer
18 views

Is my bayes classification right or meaningful?

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: ...
2
votes
4answers
138 views

How to improve results in classification problems (SVM, Logistic Regression and MultiNaive Bayes)?

I am new on Machine Learning and building models but a lot of tutorials has given me the chance to learn more about this topic. I am trying to build a predictive model for detecting fake news. The ...
1
vote
1answer
19 views

How does the Naive Bayes algorithm function effectively as a classifier, despite the assumptions of conditional indpendence and bag of words?

Naive Bayes algorithm used for text classification relies on 2 assumptions to make it computationally speedy: Bag of Words assumption: the position of words is not considered Conditional Independence:...
0
votes
1answer
137 views

Suspiciously low False Positive rate with Naive Bayes Classifier?

I am performing phishing URL classification, and I am comparing several ML classifiers on a balanced 2-class data-set (legitimate URL, phishy URL). The ensemble and boosting classifiers such as ...
-1
votes
1answer
343 views

How to increase a low recall value?

I am dealing with a HR Attrition Dataset which is highly unbalanced. I used Balancing technique like SMOTE to generate synthetic data and then used Gaussian Naive Bayes to Classify the Attrition. ...
0
votes
1answer
62 views

Text classification analysis based on similarity

I have been reading a lot of literature regarding text classification and different approaches/models, especially using Python language, but probably I am still missing something on how to build the ...
0
votes
1answer
522 views
2
votes
2answers
6k views

Hyper-parameter tuning of NaiveBayes Classier

I'm fairly new to machine learning and I'm aware of the concept of hyper-parameters tuning of classifiers, and I've come across a couple of examples of this technique. However, I'm trying to use ...
1
vote
1answer
43 views

Classification - get some label value to check how close to another class (Python)

I am doing text classification in python with 3 alghoritms: kNN, Naive Bayes and SVM. I have 3 classes - easy, medium and hard. The accuracy is quite fine. Is there a way to check for new text its ...
0
votes
0answers
24 views

How to distinguish Multivariate Bernoulli Distribution from Binomial Distribution,Multinoulli distribution,Multinomial distribution?

Ok While studying naive Bayes I came across this question and from the accepted answer I reach to this blog. While reading this blog I got a clear idea of how Bernoulli distribution turns to (...
1
vote
1answer
629 views

Can you use two different datasets as train and test sets with countVectorizer and test_train_split?

So I managed to run my code on a combination of train data and validation data, but now I need to create a text file that contains the predictions for the test data and I just don't understand how. Is ...
2
votes
1answer
93 views

Kohen Kappa Coefficient of Naive Bayes with 62% overall accuracy is better than Logistic Regression with 98% accuracy?

I have been trying to evaluate my models used on fire systems dataset with a huge imbalance in the dataset. Most models failed to predict any true positives correctly however naive Bayes managed to do ...
0
votes
0answers
29 views

Is it possible to plot a ROC for a multi class naive bayes?

I'm trying to plot a ROC curve for a multilabel Bayes Naive dataset with roughly 30 different classes. In doing the confusion matrix, it is immediately clear the results, but this attempt is for ...
0
votes
1answer
274 views

How to compute denominator in Naive Bayes?

Suppose we have class C_k and input feature vector x in dataset How to calculate probability ...
2
votes
1answer
18 views

How to calculate probability of non independence using bayes theorem?

i looked into one of the post about naive bayes calulation of naive part Predit the class label for instance (A=1,B=2,C=2) using naive Bayes classifcation. Let C1 be class 1 and C2 be class 2. For ...
2
votes
1answer
74 views

why naive is needed in Naive Bayes ,what happens if naive is not included in Bayes theorem?

Im trying to understand why naive is needed in Naive Bayes and everyone says Naive Bayes assumes the input features (predictors) are not correlated hence they are not dependent on each other . i want ...
2
votes
1answer
30 views

What is the “learning” step in Gaussian Naive Bayes classification?

For conditionally independent features $f_i$, Naive Bayes Classification gives me the classifier $Classifier(f) := \arg \max_{k} P(C=k) · ∏^n_{i=1} P(f_i|C=k)$ for classes $k$. I understand that ...