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
0 votes
0 answers
59 views

Prediction in multiclass classification

Context: I need to make an multiclass classification to predict what type of sentence(law) the case will have in the end. Data: I Have several columns to predict the case:client, cause of action, ...
TM01's user avatar
  • 1
2 votes
1 answer
56 views

Text preprocessing decreases classifier accuracy

I try to solve a binary text classification problem using sklearn's Tfidf Vecotrizer and a naive bayes classifier. Before I pass the training/test data to the vectorizer I do some text preprocessing. ...
MC Racoon's user avatar
0 votes
0 answers
26 views

Naive Bayes classifier without training

I've a pooled group of individuals and a given number of features. So that my matrix looks like: individuals feature1 feature2 feature3 bob 1 0 1 ralph 0 1 1 mark 1 0 1 I want to discriminate ...
Lu_Ste's user avatar
  • 1
1 vote
1 answer
152 views

Why Naive Bayes is not written as $$P(A|B) = \frac{P(A \cap B)}{P(B)}$$

I am currently learning Naive Bayes and observed that equation is given as, $$P(A|B) = \frac{P(A).P(B|A)}{P(B)}$$ where, B are features and A is prediction value(yes/no) But why not write it as, $$P(A|...
Aamod Thakur's user avatar
0 votes
0 answers
30 views

Multi-label predictive modeling using Naive Bayes

I'm working on a predictive model that currently uses scikit-learn's Naive Bayes (testing with both Bernoulli and Gaussian) but I'm running into some trouble. First I have a large dataset of records (...
user145156's user avatar
1 vote
2 answers
55 views

A classification problem

I have a set of objects, each of which can have (but doesn't always exhibit) a set of properties. Properties are shared between objects, in the sense that different objects can have common properties ...
bontchev's user avatar
  • 111
1 vote
1 answer
55 views

Test score higher than train score

I implemented a Gaussian Naive Bayes classifier and I got a test score (99,99%) higher than the train score (96,87%) Is this normal or does it mean that my model is underfitting ? Thank you.
biihu's user avatar
  • 11
1 vote
1 answer
31 views

How to properly compute spam message score as a combination of fixed features and probability from a naive bayes classifier?

I am building a learning spam/ham email classifier as an assignment. It's not supposed to be a good general classifier, but one that can learn on a small set of labeled emails of a user (approx. 650 - ...
David Korčák's user avatar
0 votes
2 answers
267 views

Does it make sense to build a ROC curve for Naive Bayes classification?

These past days, in college, we have been learning about NaiveBayes. Since it's a classification algorithm, I was wondering if I could evaluate NaiveBayes models the same way (using the same metrics) ...
ilved17's user avatar
  • 31
0 votes
0 answers
70 views

comparison between gaussian Naive bayes and logistic regression

I am following the lectures CORNELL CS4780: Machine learning for Intelligent Systems. Link:- https://www.youtube.com/watch?v=GnkDzIOxfzI&list=PLl8OlHZGYOQ7bkVbuRthEsaLr7bONzbXS&index=11&...
Ayush's user avatar
  • 1
0 votes
1 answer
145 views

Why there is no alpha parameter for GaussianNB()?

Why there is no alpha argument ( smoothing parameter in Laplace smoothing) for GaussianNB() in sklearn library? ? Although BernoulliNB() and MultinomialNB() have an alpha parameter but GaussianNB() ...
AAA's user avatar
  • 35
1 vote
1 answer
126 views

Naive Bayes implementation using SkLearn documentation

I am studying Naive Bayes classification method from Data Mining Concept and Technique by Han, Kamber, Pei. There is an example of how to find out the class probability using Naive Bayes classifier. ...
Encipher's user avatar
  • 359
0 votes
1 answer
56 views

SkLearn Categorical Naive Bayes Vs Mathematical theory of Naive Bayes

The Naive Bayes classification based on the following formula $P(C_i|X) = {P(X|C_i)P(C_i) \over P(X)} ... i)$ $P(X|C_i)$ is the posterior probability of $X$ conditioned on $C_i$, $P(X)$ prior ...
Encipher's user avatar
  • 359
0 votes
1 answer
62 views

Fluctuating accuracy for Naive Bayes Classifier and SVM

I am comparing the classification accuracy between Naive Bayes (NBC), SVM and a Neural Network. I am using a Dataset of ~18K and 26 Labels. In the current state the Neural Network get always an ...
Adrian's user avatar
  • 3
1 vote
0 answers
135 views

How are the weights defined in a (linear-chain) Conditional Random Field?

Edit: i saw that i mixed up i (in the graph) and t (in the formula), in the following i equivalent to t I am trying to understand the theory behind linear chain Conditional Random Fields. I have now ...
bolli's user avatar
  • 11
1 vote
1 answer
48 views

Confused on Naive Bayes classifier

In the last part of Andrew Ng's lectures about Gaussian Discriminant Analysis and Naive Bayes Classifier, I am confused as to how Andrew Ng derived $(2^n) - 1$ features for Naive Bayes Classifier. ...
Alpha code 's user avatar
1 vote
1 answer
19 views

Naive Bayes classifiers working principal raise question

Naive Bayes classifier works on the principal of conditional independence. Take an example, a bank manager wants to know how risky it is to approve loan for a customer depending upon customers ...
Encipher's user avatar
  • 359
1 vote
1 answer
30 views

Looking for in depth knowledge in evalution metric

I am dealing with an unbalanced dataset. The total instances in my dataset is 1273 and the Yes class is 174 and No class is 1099. So the unbalance ratio is like 1:6. Now I know ...
Encipher's user avatar
  • 359
1 vote
2 answers
139 views

Naive Bayes as a baseline model in an NLP task

I want to use the Naive Bayes model as a baseline in an classification task that I am working. I found this really useful tutorial: https://www.geeksforgeeks.org/applying-multinomial-naive-bayes-to-...
John Smith's user avatar
0 votes
1 answer
188 views

Scikit learn ComplementNB is outputting NaN for scores

I have an unbalanced binary dataset with 23 features, 92000 rows are labeled 0, and 207,000 rows are labeled 1. I trained models on this dataset such as GaussianNB, DecisionTreeClassifier, and a few ...
Sharhad Bashar's user avatar
0 votes
1 answer
61 views

Interpret Naive Bayes output Python

I am running Python code off Kaggle on the adult dataset using Naive Bayes. How do you interpret the results below, I know that it's for each instance the likelihood they make less than 50K or more ...
FredNina's user avatar
2 votes
1 answer
192 views

Are there any implementations of non Naive Bayes Classifier in Python?

Naive Bayes assumes that predictors are independent. Though this assumption is quite powerful, in some scenarios it fails miserably . So are there any implementations of non Naive Bayes in Python ? ...
Abhisek Dash's user avatar
2 votes
0 answers
48 views

Classification Texte with naive bayes complement

Currently I am on a text classification project, the goal is to classify a set of CVs according to 13 classes. I use the bayes algorithm (ComplementNB), in my tests it is the model that gives the ...
amroun lysa's user avatar
2 votes
0 answers
592 views

Naive Bayes ValueError: Dimension Mismatch

I am attempting to make predictions of categories of text data, one of which is Naive Bayes. The training data contains 7 categories, 802 data points. After balancing with SMOTE all 7 categories now ...
Michael Kessler's user avatar
1 vote
0 answers
61 views

How to classify a point using Bayes classifier?

The following 2 classes dataset is available: $$ C_{1}=\left \{ 17,18,19,20,21 \right \},C_{2}=\left \{ 12,14 \right \} $$ If we assume each class distribution is gaussian, To which class does x=16 ...
loosi95's user avatar
  • 11
1 vote
1 answer
2k views

Naive Bayes loss function

Does Naive Bayes classifier require a loss function for Bernoulli classification? If yes, what loss function does Naive Bayes classification use? And how does it work?
Apoorva's user avatar
  • 275
1 vote
2 answers
364 views

How to calculate true positive, true negative, false positive, negative and postive with Bayes Classifer from scratch

I am working on implementing a Naive Bayes Classification algorithm. I have a method def prob_continous_value which is supposed to return the probability density ...
Evan Gertis's user avatar
0 votes
1 answer
44 views

How to implement Naive Bayes classifier

I am working on implementing a Naive Bayes Classification algorithm. The problem requires classifying the following datasets: ...
Evan Gertis's user avatar
3 votes
1 answer
599 views

What Shape Does Naive Bayes make?

Decision Trees draw straight lines to partition the feature space. According to the Universal Approximation Theorem, Neural Networks can draw any continuous function. What sort of shape does the Naive ...
Neil's user avatar
  • 257
1 vote
1 answer
38 views

How different classifiers would perform on a particular data set

I am reading through and learning how different ML methods work on different types of data, but I have faced a data set that I am not sure how ML methods, such as decision tree, Naive Bayes, and KNN, ...
user9532692's user avatar
1 vote
3 answers
322 views

How do I deal with unbalance classes in a stock market prediction problem?

I am working on a prediction model to predict whether a stock should sell, hold or buy in n days. Each day (or row in the dataset), I classify whether this should ...
user3118602's user avatar
1 vote
1 answer
71 views

Comparison of different Naive Bayes algorithm for SMS classification

There are various types of Naive Bayes algorithms in the Sklearn library: Can all of them be used for text classifications? And which one's perform bette I tested out a simple text classification ...
Juan's user avatar
  • 15
0 votes
1 answer
67 views

Algorithms for SMS spam detection

Which among KNN, Logistic and Naive Bayes would yield best results for SMS spam detection? Is there any other efficient approach worth exploring. I am planning to make a python application for SMS ...
nanu's user avatar
  • 3
2 votes
0 answers
115 views

What type of 'Naive Bayes' algorithm is provided by Orange?

I've been using Orange for a while to rapidly prototype a few classification models. One of the ones I've been using is 'Naive Bayes'. If I understand correctly, there are a few types available based ...
Cranialsurge's user avatar
2 votes
1 answer
564 views

Really confused with characteristics of Naive Bayes classifiers?

Naive Bayes classifiers have the following characteristics-: They are robust to isolated noise points because such points are averaged out when estimating contiditional probabilities from data. Naive ...
achhainsan's user avatar
1 vote
2 answers
101 views

How to choose products based on Number of good, bad and total reviews?

Let us suppose, I have few scenarios for products with good and bad reviews. P1: 1000 Good, 1 bad P2: 100 good, 10 bad P3: 20 Good, 0 bad P4: 10000 good, 500 bad ...
Deshwal's user avatar
  • 323
1 vote
0 answers
107 views

Why exactly KNN is outperforming Parzen by a huge margin in classificaton task

I'm trying to implement a Naive Bayes classifier, which uses either of hypercubic Parzen window or KNN to estimate a density function. The data I'm using is Fashion MNIST. The steps I take are that ...
Farhood ET's user avatar
0 votes
1 answer
202 views

Naive bayes expectation maximization vs logistic regression for binary classification

Assuming I'm dealing with binary classification. For what kind of data Naive bayes using expectation maximization would give a better solution and for what kind of data logistic regression would be ...
Lilo's user avatar
  • 101
1 vote
0 answers
102 views

Naive Bayes model - Missing output variable for specific sample(s)

With Naive Bayes model can we discard a training sample if the value of the sample's output variable is missing? And would that not make any difference to the parameter learning of the Naive Bayes ...
Joquim's user avatar
  • 11
1 vote
2 answers
325 views

Independence of Features assumption in Naive Bayes

How do we know if your features in my dataset are independent before applying Naive Bayes? Basically I want to know is it possible for us to get an idea before training our model if Naive Bayes will ...
smsubham's user avatar
0 votes
1 answer
165 views

Bad Input Shape -- How to interpret and Diagnose; Also side ML question

I apologize I am a ML novice, but I am trying to learn. I am making a classifier based on this dataset to predict mental health disorders based on features. I wanted to run a very simple NB classifer ...
thefairpharaoh's user avatar
1 vote
1 answer
555 views

Naives Bayes Text Classifier Confidence Score

I am experimenting with building a text classifier using Naive Bayes which has been pretty successful on my test data. One thing i am looking to incorporate is handling text that does not fit into any ...
Jim's user avatar
  • 31
0 votes
0 answers
29 views

Can one still train a classifier with an unbalanced data set?

I want to train a binary Naive Bayes classifier. The problem is, is that I have an unbalanced set at my disposal, where the ration between the two classes is roughly 2:1 (250 examples from the first ...
JavaApprentice's user avatar
1 vote
2 answers
107 views

Word list as a baseline for measuring a classifier's performance?

I am working on a simple Naive Bayes classifier that categorizes text messages as either "positive" or "negative". I was told that the simplest baseline to measure the classifier's ...
JavaApprentice's user avatar
0 votes
1 answer
111 views

Random Sequence Predictions

Can machine learning algorithms predict random number generators. key A= 1 2 3 B= 4 5 6 C= 7 8 9 Example to catch a number sequence 4 8 8 I would select B C C That would give me 27 number combinations ...
John's user avatar
  • 9
2 votes
1 answer
3k views

How to interpret training and testing accuracy which are almost the same?

Note - I have read this post but still don't understand I have a Naive Bayes classifier, when I input my training data to test the accuracy, I get 63.05%. When I input my test data, the accuracy is 65....
datanewbie96's user avatar
1 vote
1 answer
93 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. ...
JiJoik's user avatar
  • 47
-1 votes
1 answer
299 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 ...
TheChicken4452's user avatar
1 vote
1 answer
105 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 ...
E. Turok's user avatar
2 votes
1 answer
496 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 (...
Sakib Khan's user avatar

1
2 3 4 5