Naive Bayes Classifier in Python (from scratch!)

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025

ความคิดเห็น • 48

  • @sayantansadhu6380
    @sayantansadhu6380 3 ปีที่แล้ว +17

    The from scratch series in this channel is the best !!

  • @MarwaneElMoufaoued
    @MarwaneElMoufaoued 12 วันที่ผ่านมา

    Thank you bro, i really needed this video because i was struggling a little bit with probabilities ✨🙏

  • @HaiderAli-hp6tl
    @HaiderAli-hp6tl 2 ปีที่แล้ว +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.

  • @amitkumarghosh
    @amitkumarghosh 10 หลายเดือนก่อน

    I can't believe this man is doing this for free, thank you brother

  • @secondarypemail7181
    @secondarypemail7181 2 ปีที่แล้ว +4

    Thanks man,your effort to make algorithms from scratch is just on another level.Your effort is much appreciated👍

  • @lucascojot7226
    @lucascojot7226 3 ปีที่แล้ว +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

  • @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 )

  • @caljohn1475
    @caljohn1475 2 ปีที่แล้ว

    You're a legend my dude, thanks so much for explaining this

  • @tarabalam9962
    @tarabalam9962 ปีที่แล้ว

    this gave a lot of clarity , thanks

  • @cheatforlife
    @cheatforlife 2 ปีที่แล้ว

    Thank you for opening up new horizons for me

  • @glennbroyne7316
    @glennbroyne7316 3 ปีที่แล้ว

    Fantastic video, very well explained!

  • @kushagrakumar9576
    @kushagrakumar9576 3 ปีที่แล้ว +1

    Excellent video. Keep up the good work 🙂

  • @AbhishekS-cv3cr
    @AbhishekS-cv3cr 8 หลายเดือนก่อน

    You can also ignore mean_radius feature, since it has some correlation with other features

  • @LucasPiorino
    @LucasPiorino 7 หลายเดือนก่อน +1

    What 36 and 74 means at 13:49?

  • @caljohn1475
    @caljohn1475 2 ปีที่แล้ว +1

    @normalized Nerd How do you make a prediction with this using specific values?

  • @tudorjeverdan
    @tudorjeverdan ปีที่แล้ว +1

    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.

  • @averyiorio4337
    @averyiorio4337 3 ปีที่แล้ว

    amazing content and fantastic explanations

  • @daskoujr2670
    @daskoujr2670 2 หลายเดือนก่อน

    Very nice! , I think the only thing missing is smoothing in case you encounter a wild case?!

  • @jorgetaboada6500
    @jorgetaboada6500 3 ปีที่แล้ว

    Sorry, again I do understand now, and also I apply in my work with excellent results, Thanks!

  • @dimamedvedev4124
    @dimamedvedev4124 8 หลายเดือนก่อน

    Great lesson. But still don't understand how we get array with posterior given certain set of features befor using np.argmax?

  • @teetanrobotics5363
    @teetanrobotics5363 3 ปีที่แล้ว +1

    SVMs,Random Forest and gradient boosting left in the playlist

    • @NormalizedNerd
      @NormalizedNerd  3 ปีที่แล้ว +1

      Humm...I'll add them eventually.

  • @Mustistics
    @Mustistics 2 ปีที่แล้ว +1

    Damn, I was hoping for a SKlearn tutorial!

  • @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.

  • @vishwajeetdeulkar3862
    @vishwajeetdeulkar3862 3 ปีที่แล้ว

    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?

  • @sukhmanpreetsinghsandhub2042
    @sukhmanpreetsinghsandhub2042 2 ปีที่แล้ว

    Awesome video.

  • @alexchristian220
    @alexchristian220 3 ปีที่แล้ว +2

    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].?

  • @yashicasaun
    @yashicasaun ปีที่แล้ว +1

    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.

  • @placement10lpa36
    @placement10lpa36 2 ปีที่แล้ว

    can someone explain me the guassian distribution part

  • @UdayKumar-yv7ej
    @UdayKumar-yv7ej 10 หลายเดือนก่อน

    Bro for this code how to convert string to float bro

  • @muhammadirsyaduddin6597
    @muhammadirsyaduddin6597 2 ปีที่แล้ว

    Hello! Is it possible to add the multinomial in the code? Thank you.

  • @shortyTalks
    @shortyTalks 2 ปีที่แล้ว

    😃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

  • @minasahebi1474
    @minasahebi1474 2 ปีที่แล้ว

    perfect!

  • @jorgetaboada6500
    @jorgetaboada6500 3 ปีที่แล้ว +1

    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 2 ปีที่แล้ว +1

      DataFrame, just means the data

  • @Techup1000
    @Techup1000 3 ปีที่แล้ว +1

    Nice video