Understanding and Applying Naive Bayes in R

  Рет қаралды 6,100

Spencer Pao

Spencer Pao

Күн бұрын

Пікірлер: 16
@jcnarasimhan8966
@jcnarasimhan8966 2 ай бұрын
Great content. If I may, pls do consider adding an addendum with the Python implementation of each topic !
@TheJohoy
@TheJohoy Жыл бұрын
Hi Spencer, how's it going?! I got a question. I've started studying Naive Bayes recently and in some of the formulas the multiplication of the initial probability P(H) and the product of each Evidence probability given the Hypothesis P(E|H) is divided by the probability of the Evidence P(E). By 7:50 you show your function and it doesn't have the division part. Any reason for that?
@SpencerPaoHere
@SpencerPaoHere Жыл бұрын
Ahh yes. This is bayes rule. if P(E|H) = P(E), then this assumes the events are independent.
@SanchiAgarwal-cx5rh
@SanchiAgarwal-cx5rh 9 ай бұрын
Sir could you please tell me, how to calculate the accuracy of this model as well?
@huiliwang8953
@huiliwang8953 3 жыл бұрын
Thank you Spencer. Your videos are super helpful. I have a quick question at 8:33 -- Why multiplied by the initial init_pos or init_neg? Wouldn't it give higher weight to positive prediction?
@SpencerPaoHere
@SpencerPaoHere 3 жыл бұрын
Hi! Glad you liked it! At 8:33, those are the weights for the positive and negative values that exist within the dataset. P(N) * P(N | X_i) -- See lines 17 and 18 in the Rscript I posted on github. Those are where the variables come from. I hope that helps!
@huiliwang8953
@huiliwang8953 3 жыл бұрын
Got it. Need to level off the weights of pos/neg probability calculated from the skewed subdatasets. Thanks.
@snsdsunnyrocks
@snsdsunnyrocks 3 жыл бұрын
Love ur videos! It’s very useful although it will be great if u can share the codes online for the examples 😅
@SpencerPaoHere
@SpencerPaoHere 3 жыл бұрын
Sure thing! Github link: github.com/SpencerPao/Data_Science/tree/main/Naive%20Bayes
@snsdsunnyrocks
@snsdsunnyrocks 3 жыл бұрын
@@SpencerPaoHere Thanks man! I learnt a lot from your videos :)
@sahil_shrma
@sahil_shrma 2 жыл бұрын
Hey, this video is really useful However I have occured with some problems > classify_sentiment(" My name is Sahil Sharma") [1] "name" "sahil" "sharma" [1] "Positive" > classify_sentiment(" I do not like this Restaurant") [1] "like" "restaurant" [1] "Positive" > classify_sentiment(" I hate the restaurant services") [1] "hate" "restaurant" "services" [1] "Positive" > classify_sentiment(" Services were poor") [1] "services" "poor" [1] "Positive" > classify_sentiment("You're fired") [1] "fired" [1] "Negative" > classify_sentiment("The company is going under loss") [1] "company" "going" "loss" [1] "Positive" See, In the second command I tried to use "I do not like this Restaurant" which is obviously a Negative sentiment. But, our classifier is incorrectly telling that it's a positive sentiment. Would you please guide me how to improve it.
@SpencerPaoHere
@SpencerPaoHere 2 жыл бұрын
This seems like a classification issue. There are a variety of ways to potentially improve this. You can start with the following: Are you tagging enough data to classify correctly? Are you tagging the appropriate parts of speech? What type of sentiment model are you using?
@sahil_shrma
@sahil_shrma 2 жыл бұрын
@@SpencerPaoHere Thank you! I will look over these questions.
@semilshah8252
@semilshah8252 2 жыл бұрын
faced same issue even if i am selecting data from which i trained the model it shows negative data as positive have you camed up with a solution @Sahil Sharma ?
@sahil_shrma
@sahil_shrma 2 жыл бұрын
@@semilshah8252 No, at that time i dropped the idea of using this model. But, i think this is a issue of training data or less amount of data. Therefore, i think you can dig deep at training part of the model.
@semilshah8252
@semilshah8252 2 жыл бұрын
@@sahil_shrma okay thanks
Bayesian Regression in R
19:39
Spencer Pao
Рет қаралды 14 М.
Understanding and Applying Factor Analysis in R
14:38
Spencer Pao
Рет қаралды 22 М.
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
Naive Bayes, Clearly Explained!!!
15:12
StatQuest with Josh Starmer
Рет қаралды 1,1 МЛН
Understanding and Applying XGBoost Classification Trees in R
17:46
Naive Bayes classifier: A friendly approach
20:29
Serrano.Academy
Рет қаралды 148 М.
Quarto  -  replacing R Markdown in R Studio.
14:04
R Programming 101
Рет қаралды 31 М.
Naive Bayes Classification with R | Example with Steps
14:55
Dr. Bharatendra Rai
Рет қаралды 74 М.
K-Means Clustering In R (feat. Tidyclust)
9:16
🔥 Matt Dancho 🔥 (Business Science)
Рет қаралды 6 М.
Naïve Bayes Classifier -  Fun and Easy Machine Learning
11:59
Augmented AI
Рет қаралды 444 М.
R Stats: Naive Bayes and k-NN
17:09
ironfrown
Рет қаралды 27 М.
Understanding and Applying XGBoost Regression Trees in R
13:16
Spencer Pao
Рет қаралды 7 М.
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН