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]

The tag has no usage guidance.

1
vote
0answers
12 views

Derivation of the formula for the probability of a class, given conditionally independent attributes.

The following is a formula that finds the posterior probability of a class (i.e. yes or no) given four conditionally independent attributes: $$P(c|X) = P(x_1|c)\cdot P(x_2|c)\cdot P(x_3|c)\cdot P(x_4|...
0
votes
1answer
9 views

Relationship between Naive Bayes and MLE

I have found various references describing Naive Bayes and they all demonstrated that it used MLE for the calculation. However, this is my understanding: $P(y=c|x)$ $\propto$ $P(x|y=c)P(y=c)$ with $...
1
vote
0answers
20 views

Agreeing to disagree “simple” example

I'm looking at Aumann's work "Agreeing to Disagree", and trying to understand the very first numerical example. So, the paper starts with definitions [L]et $(\Omega, \mathcal{B}, p)$ be a ...
0
votes
0answers
19 views

Naive Bayes classifier & the probability distribution

I have posted this question to the programming stackoverflow as it is something I have came upon as a programmer but it's more a math problem. I'm using PHP module called TNT Search for text ...
1
vote
1answer
39 views

Arriving at Maximum Likelihood Estimates

I am trying to develop a text classifier and I'm reading about MLE to help me understand the process. I came across this example: and I wanted to try this myself. I'm running into a problem and so ...
0
votes
0answers
13 views

laplace smoothing in naive bayes likelihood

I'm studying Naive Bayes in relation to text processing, sentiment analysis etc, and come across the concept of laplace smoothing a.k.a. additive smoothing. I totally understand why and how it is done ...
0
votes
0answers
49 views

Confused on how to Apply Naive Bayes for Discrete Data

Assuming I have a table of data as such: I wish to use Naive Bayes to predict if a person is poor or rich given his country and job. Assuming I have other data such as the specific entries of rich/...
0
votes
1answer
112 views

Why does $P(A,B | C) = P(A|C) \cdot P(B|C)$

I'm in an NLP course learning about naive bayes statistics. We briefly went over joint and conditional probabilities. Why does $P(A,B | C) = P(A|C)\cdot P(B|C)$
2
votes
2answers
40 views

Bayes' theorem on continuous interval

I'm reading up on naive Bayes' classifiers, and it's just an application of Bayes' theorem. Which makes sense in a discrete space; example: counting the number of apples versus oranges, and predicting ...
1
vote
1answer
39 views

Combining two probablities based on context

I have written an object detection algorithm which can localize different classes on a given image. For each class, the output is given as a list of bounding boxes around each detected class along ...
0
votes
0answers
87 views

Naive Bayes Algorithm with floating weights or zero weights

What happens on those cases on Naive Bayes Algorithm : 1.one of the weights are zero ? 2.one of the weights are float? I am asking because i am trying to use Naive Bayes to develop small ...
0
votes
1answer
33 views

Probability for text classification

I have a list of sentences and each sentence is classified with a number of emotions ex: I loved the movie Happiness $= 1$ Disappointment $= 0$ I hated the move Happiness $= 0$ Disappointment $= 1$ ...
1
vote
1answer
289 views

What is p(biased coin given heads) in 2 Fair coin, 1 biased coin experiment

In "Conditional probability with Bayes" theorem in Khan's academy, in 2nd experiment, where author has 2 fair coins, and 1 biased coin, he tries to calculate probability of biased coin, after first ...
1
vote
0answers
166 views

Is my derivation for the maximum likelihood estimation for naive bayes correct?

I think I have I gotten the wrong formula for the following derivation, but I don't know where. here is my explanation: For a task on sentiment analysis, suppose we have some classes represented by $...
1
vote
0answers
155 views

Bayes theorem usage for Ham/Spam detection

I am trying to understand the probability calculations using Bayes theorem for a ham/spam classification problem (that uses Naive Bayes). I have a training set of ham and spam data with appropriate ...
1
vote
0answers
41 views

How can I predict Naive Bayes data(spam or ham)?

For example, I have Naive Bayes data like data : probability Fastest : 1 digit : 0 Find : 0.643234 Forum : 0.562904 Free : 0.857344 I might say if there is a word "data" in a certain ...
0
votes
1answer
741 views

Naive Bayes classifier big O complexity

I am trying to learn about The Naive Bayes Classifier as defined by the following: where $\textbf{x} \in \{1, ... , K\}^{D}$ $K$ is the number of different values a feature can have $D$ is the ...
4
votes
1answer
280 views

Bayes classification with a simple example of mail classification

Every mail is described by a bag of words: $x = (x_1, . . . , x_l)$, where $x_i \in \{0, 1\}$ indicates whether the $i$th word is present or not. We have $n$ training samples ${(x^1,y^1),....(x^n,y^n)}...
0
votes
1answer
74 views

Naive Bayes problem applied to text

Assume that you are using a Naïve Bayes classifier to classify some documents into two classes, Sports and Health docs. Assume that there are only $5$ words used in your model. Let us denote these 5 ...
2
votes
1answer
852 views

Naive Bayes Classification Example

Given the following data: $$\begin{array}{c|c|c|c|c|} \text{Instance} & \text{A} & \text{B} &\text{C} &\text{Class} \\ \hline \text{1} & 1 & 2 & 1 & 1 \\ \hline \text{...
0
votes
1answer
28 views

How is the right term derived in this conditional probability statement?

Does anyone know how to get the right term? It seems like the right term is actually $P(C, x_1, x_2, \ldots, x_n)$ and not $P(C \mid x_1, x_2, \ldots, x_n)$?
2
votes
1answer
196 views

How can the following $\arg \max$ function be reduce?

Let $\theta \sim \mathcal{U}$ and $A(x)$ be defined by the random variable $x$ by: $$A(x)=x-\lfloor x\rfloor$$ Calculate the MAP estimator $\hat \theta_{MAP}$ for the inputs $A(x)\in [0,0.001]$ $$...
2
votes
1answer
142 views

Finding the naive Bayes classifier

Let $Y$ have a Bernoulli distribution with P(Y=0)=0.2 and $X$ have a Bernoulli distribution with: $$f(X|Y) = \begin{cases} 0.7 & \quad X=Y\\ 0.3 & \quad \text{ else}\\ \end{...
0
votes
1answer
857 views

Interpreting the results of a Naive Bayes classifier.

Using the Naive Bayes formula to classify text I have something like... $$ P(Cat|Word1) = \frac{P(Word1|Cat) * P(Cat)}{P(Word1)} $$ Using a small example ... ...
0
votes
1answer
382 views

Naïve Bayes Classifier

For the Data Mining - Naïve Bayes Classifier for the case of "Numberless values for an attribute", the conditional probability is modeled with the normal distribution (see below). Probability Density ...
0
votes
1answer
73 views

Bayesian Nets and weird probability

I have to solve the following problem: Suppose we have a bayesian net in which we have the following variables: R, PA and PR Let: P(R) = 0.1, P(PA) = 0.5, P(PR|R, PA) = 0.6, P(PR|¬R, PA) = 0.4, P(...
0
votes
1answer
29 views

Probability with a joined condition

I want to know the probability $P(A|X,Y)$, given that I know $P(A|X)$, $P(A|Y)$, $P(A)$, $P(X)$, $P(Y)$ and given, that $X$ and $Y$ are independent. I'm also going to assume that $X$ and $Y$ are ...
1
vote
1answer
310 views

Bernoulli Naive Bayes Classification

I am having trouble understanding the following text regarding Bernoulli Naive Bayes. Specifically, the author mentions that $i$ is a feature. However, what is the difference between $x_i$ and $i$?
0
votes
1answer
95 views

How to solve conditional probability problem using bayesian algorithm

I am trying to solve An agent learning to categorise news articles in two topics, World (W) and Finance (F). Out of $100$ articles, $40$ were classified as W, and $20$ of the articles were ...
4
votes
1answer
58 views

What assumptions did I make when I strengthened my independence criterion across a new random variable?

I have an algorithm which tries to calculate some $\operatorname{Pr(X | Y_1 Y_2 \dots )}$ (where juxtaposition means event intersection, "given $Y_1$ and $Y_2$ and ... have happened".) We have some ...
2
votes
0answers
131 views

The significance of odds and logs in Bayes Naive Classification

I do understand the concept of Naive Bayesian classification, as it tries to calculate the probability of an outcome of a class given multiple evidences. It comes from the Bayes theorem and it is ...
0
votes
1answer
701 views

Naive Bayes: Conditional Independence vs. Marginal Independence Assumption

Apologies if this question would rather belong on Stat SE. I am following Kevin Murphy's tutorial A brief introduction to Bayes' Rule. I seem to follow his derivations formally, but my intuition in ...
2
votes
1answer
80 views

Translation:Bayes Classificator -> precise math?

I want to understand the most simple form of the Bayes classificator (see here) but I want to understand it in a really precise, clean, mathematical way. Math description of the setting: Let us ...
1
vote
1answer
255 views

Trouble understanding how Naive Bayes Classifier is derived

I've come across the Naive Bayes Classifier while studying machine learning, but the trouble I'm having is with some of the probability theory used to derive the formula for finding the optimal ...
0
votes
1answer
1k views

Cluster probabilites: Bayesian network (sprinkler example, Russel/ Norvig) as a clustered network

like others here I am also learning with Russel's and Norvig's book about artificial intelligence. My question is about the conditional probability tables of a clustered multiply connected network ...
0
votes
2answers
852 views

Conditional probability of C given two independent events

Suppose that a machine depends on the working state of two components A and B. If both $A$ and $B$ do not function then the probability (say $C$) of the machine to work is $0.3$ If both $A$ and $B$ ...
2
votes
0answers
289 views

Bayesian Chain rule

I am going thorugh a Naive Bayes Classifier, and faced the following: $p(y|a,b,c) = \frac{p(a|y,b)*p(y|c)}{p(a|b,c)}$ When I am trying to derive the above, these are my steps: $p(y|a,b,c)=\frac{p(y,...
1
vote
1answer
323 views

Combining independent predictions into an overall probability

I am trying to understand the mathematical basis of combining independent probabilities, as described here: http://www.paulgraham.com/naivebayes.html Suppose that being over 7 feet tall indicates ...
1
vote
1answer
111 views

Bayesian Inference Problem

We have a Bayesian Network that A to D is Boolean variable. we want to calculate the probability which C and D be True and A be false. my answer sheet calculate the last result and is 0.0424. any ...
2
votes
1answer
4k views

How does arg max work in this context?

I'm implementing some stuff for machine learning and I ran across this post detailing some information on Bayes Theorem I was looking for: https://stats.stackexchange.com/questions/31891/why-does-my-...
2
votes
1answer
54 views

Gaussian prior favors values closest to zero?

I am reading an article on Bayesian Logistic Regression, where they're using Logistic Regression, imposing a Gaussian prior (with mean = 0) on its parameters. They state that a Gaussian prior favors ...
2
votes
1answer
163 views

Naive bayes problem

I have this problem: ...
1
vote
0answers
572 views

Cross Validation for the Naive Bayes Classifier

I am performing Naive Bayes classification on the spam/ham dataset. I understand how Naive Bayes works, and have it implemented in few lines of Matlab code. I was told that cross-validation can be ...
4
votes
2answers
137 views

Bayesian Spam Classification

Say I have 1000 e-mails in my inbox. I count the following things Spam 600, Ham 400 Among Spam Mails: 100 from known senders, 90 contain the word 'credit'. Among Ham Mails: 200 from known senders, 10 ...
1
vote
1answer
1k views

Naive Bayes to Predict a class label

How do I use Naïve Bayes to predict a class label for a test sample $(A=1, B=1, C=1)$ I know Bayes Theorem is: $$P(C|A) = [P(A|C) P(C)]/P(A)$$ I have no idea how to do this, please help.
1
vote
1answer
539 views

A question on raining probability using conditional probability

When A predicts raining, the chance of raining is 60%. When B predicts raining, the chance of raining is also 60%. If A and B both predict to rain (assuming they did the prediction independently), ...
2
votes
1answer
38 views

Determine which parameter has correlation with result and which is not

sorry for probably silly question, it's the first time when I need to do such work. I have large data set with regarding clicks on some element on web page. It contains some characteristics of such ...
1
vote
1answer
590 views

Naive bayes: Log odds derivation

How does one go from line 17 to 18 in the below picture? i.e. conversion to linear function of the input variable. Source: http://pages.cs.wisc.edu/~jerryzhu/cs769/nb.pdf
2
votes
1answer
121 views

Conditional distribution for a label given a scalar feature

I am trying to create a simple simulation setup for classifiers on toy data. Each data point can has a scalar feature $X$, which is uniformly distributed between -1 and 1. Depending on the feature, ...
3
votes
0answers
401 views

Interpretation of MATLAB's NaiveBayses 'posterior' function

After we created a Naive Bayes classifier object nb (say, with multivariate multinomial (mvmn) distribution), we can call ...