Naive Bayes Classifier in Python (from scratch!)

  Рет қаралды 82,297

Normalized Nerd

Normalized Nerd

3 жыл бұрын

Let's create a Naive Bayes classifier with barebone NumPy and Pandas! You'll learn how to deal with continuous features and other implementation details.
#machinelearning #datascience #python
For more videos please subscribe -
bit.ly/normalizedNERD
Join our discord -
/ discord
Bayesian classifier concept video -
• The Math Behind Bayesi...
Source code -
github.com/Suji04/ML_from_Scr...
Like my work? Support me -
www.buymeacoffee.com/normaliz...
Data source -
www.kaggle.com/merishnasuwal/...
Facebook -
/ nerdywits
Instagram -
/ normalizednerd
Twitter -
/ normalized_nerd

Пікірлер: 46
@HaiderAli-hp6tl
@HaiderAli-hp6tl 2 жыл бұрын
the number of subscribers to your channel does not do justice to your content. This is such quality educational content. Keep it up, man.
@secondarypemail7181
@secondarypemail7181 2 жыл бұрын
Thanks man,your effort to make algorithms from scratch is just on another level.Your effort is much appreciated👍
@user-nd6ll6en9j
@user-nd6ll6en9j Жыл бұрын
ممكن تبعثلي لكود
@sayantansadhu6380
@sayantansadhu6380 3 жыл бұрын
The from scratch series in this channel is the best !!
@NormalizedNerd
@NormalizedNerd 3 жыл бұрын
Thanks bro!
@caljohn1475
@caljohn1475 Жыл бұрын
You're a legend my dude, thanks so much for explaining this
@glennbroyne7316
@glennbroyne7316 2 жыл бұрын
Fantastic video, very well explained!
@lucascojot7226
@lucascojot7226 3 жыл бұрын
Super high quality videos! I'm surprised you have 8K and not 800K... Keep it up!
@NormalizedNerd
@NormalizedNerd 3 жыл бұрын
Thanks a lot! Keep supporting :D :D
@leogino9522
@leogino9522 2 жыл бұрын
Thank you for opening up new horizons for me
@tarabalam9962
@tarabalam9962 10 ай бұрын
this gave a lot of clarity , thanks
@amitkumarghosh
@amitkumarghosh 4 ай бұрын
I can't believe this man is doing this for free, thank you brother
@pietrogarofalo2957
@pietrogarofalo2957 2 жыл бұрын
Man, u save my life ty very much. Use sklearn is too easy, justify why u decide to use Naive and why u can use it is the very important thing, keep it up man . ( excuse me for my bad english )
@kushagrakumar9576
@kushagrakumar9576 3 жыл бұрын
Excellent video. Keep up the good work 🙂
@NormalizedNerd
@NormalizedNerd 3 жыл бұрын
Thank you! Will do!
@jorgetaboada6500
@jorgetaboada6500 2 жыл бұрын
Sorry, again I do understand now, and also I apply in my work with excellent results, Thanks!
@NormalizedNerd
@NormalizedNerd 2 жыл бұрын
Great to hear that!
@averyiorio4337
@averyiorio4337 3 жыл бұрын
amazing content and fantastic explanations
@NormalizedNerd
@NormalizedNerd 3 жыл бұрын
:D
@sukhmanpreetsinghsandhub2042
@sukhmanpreetsinghsandhub2042 2 жыл бұрын
Awesome video.
@caljohn1475
@caljohn1475 Жыл бұрын
@normalized Nerd How do you make a prediction with this using specific values?
@AbhishekS-cv3cr
@AbhishekS-cv3cr Ай бұрын
You can also ignore mean_radius feature, since it has some correlation with other features
@minasahebi1474
@minasahebi1474 Жыл бұрын
perfect!
@shortyTalks
@shortyTalks Жыл бұрын
😃Bro thx for the nice explanation. Are you using a theme for vs code, cuz all the colours in your systems are looking damn good
@abhisheksinghyadav4970
@abhisheksinghyadav4970 Жыл бұрын
atom material theme
@yashicasaun
@yashicasaun Жыл бұрын
When you are checking for gaussian curve, shouldn't you have filtered for different diagnosis and then check if the curve fits? Because now, we see the data fits gaussian. But we then change the data and only take a subset and then fitting the curve Thanks for the great video.
@dimamedvedev4124
@dimamedvedev4124 Ай бұрын
Great lesson. But still don't understand how we get array with posterior given certain set of features befor using np.argmax?
@muhammadirsyaduddin6597
@muhammadirsyaduddin6597 2 жыл бұрын
Hello! Is it possible to add the multinomial in the code? Thank you.
@Mustistics
@Mustistics 2 жыл бұрын
Damn, I was hoping for a SKlearn tutorial!
@NormalizedNerd
@NormalizedNerd Жыл бұрын
opps
@vishwajeetdeulkar3862
@vishwajeetdeulkar3862 2 жыл бұрын
Hi, I am getting error as "index 29 is out of bounds for axis 0 with size 29" for this statement likelihood[j] *= cal_gaussianLikelihood(df,features[i],x[i],Y,labels[j]), any solution?
@pritammukherjee3972
@pritammukherjee3972 3 жыл бұрын
Nice video
@NormalizedNerd
@NormalizedNerd 3 жыл бұрын
Thanks!
@teetanrobotics5363
@teetanrobotics5363 3 жыл бұрын
SVMs,Random Forest and gradient boosting left in the playlist
@NormalizedNerd
@NormalizedNerd 3 жыл бұрын
Humm...I'll add them eventually.
@tudorjeverdan
@tudorjeverdan 9 ай бұрын
I was importing a mysql dataframe, I was importing string elements and it resolved them into objects, data = pd.read_sql_table("ai_learning", engine) columns_to_convert = ["Products", "feedback", "blog", "diagnosis"] data[columns_to_convert] = data[columns_to_convert].apply(pd.to_numeric, errors='coerce') data = data[["Products", "feedback", "blog", "diagnosis"]] This is how I fixed it if anybody was getting the same outputs.
@LucasPiorino
@LucasPiorino 15 күн бұрын
What 36 and 74 means at 13:49?
@placement10lpa36
@placement10lpa36 Жыл бұрын
can someone explain me the guassian distribution part
@hajraali1205
@hajraali1205 2 жыл бұрын
I did not understand the output, we were detecting the cancer patient, but in out put there are two matrix and accuracy data so which is which.
@UdayKumar-yv7ej
@UdayKumar-yv7ej 3 ай бұрын
Bro for this code how to convert string to float bro
@alexchristian220
@alexchristian220 3 жыл бұрын
likelihood = [1] * len(labels), post_prob = [1] * len(labels) what this above code actually do? And also how can I work this code on tennis.csv dataset?
@alexchristian220
@alexchristian220 3 жыл бұрын
bhai iska explanation bta do.
@NormalizedNerd
@NormalizedNerd 3 жыл бұрын
That's just a python shortcut. arr = [1] * n this will assign a list of n 1's to the variable 'arr'. I used this to initialize the likelihood and posterior probability lists. The tennis dataset contains only categorical variables so just relabel them to 0,1,2, etc. and apply approach 2 given the video.
@alexchristian220
@alexchristian220 3 жыл бұрын
@@NormalizedNerd bhai can you tell me what is the name of the python shortcut? and how likelihood = [1] * len(labels), replaced with likelihood[b].?
@jorgetaboada6500
@jorgetaboada6500 2 жыл бұрын
Sorry, but I do not understand who is "df" when you def a function because you have never defined. I will appreciate your explanation
@Joemama-jh5go
@Joemama-jh5go Жыл бұрын
DataFrame, just means the data
Random Forest Algorithm Clearly Explained!
8:01
Normalized Nerd
Рет қаралды 556 М.
Naive Bayes, Clearly Explained!!!
15:12
StatQuest with Josh Starmer
Рет қаралды 1 МЛН
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 19 МЛН
бесит старшая сестра!? #роблокс #анимация #мем
00:58
КРУТОЙ ПАПА на
Рет қаралды 1,4 МЛН
Sprinting with More and More Money
00:29
MrBeast
Рет қаралды 184 МЛН
How to bring sweets anywhere 😋🍰🍫
00:32
TooTool
Рет қаралды 54 МЛН
Naive Bayes classifier: A friendly approach
20:29
Serrano.Academy
Рет қаралды 140 М.
Decision Tree Classification in Python (from scratch!)
17:43
Normalized Nerd
Рет қаралды 179 М.
How to implement Naive Bayes from scratch with Python
14:37
AssemblyAI
Рет қаралды 25 М.
Naive Bayes Classifier: A Practical Tutorial with Scikit-Learn
17:55
Gaussian Naive Bayes, Clearly Explained!!!
9:26
StatQuest with Josh Starmer
Рет қаралды 326 М.
TensorFlow in 100 Seconds
2:39
Fireship
Рет қаралды 895 М.
Monte Carlo Simulation with Card Games
8:21
Normalized Nerd
Рет қаралды 49 М.
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 19 МЛН