Machine Learning Tutorial Python - 21: Ensemble Learning - Bagging

Поделиться
HTML-код
  • Опубликовано: 22 янв 2025

Комментарии • 111

  • @codebasics
    @codebasics  2 года назад +5

    Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced

  • @SinarJourney
    @SinarJourney 10 месяцев назад +4

    This channel is golden, i really like how you explain the concepts until execution to practical coding.

  • @justin.c249
    @justin.c249 2 года назад +7

    so far this is the best explanation on bagging technique I found on RUclips! Great Work

  • @jasonwang-wg8wu
    @jasonwang-wg8wu Год назад +1

    this was nice and straightforward, and the quip about "copy and paste" was hilarious

  • @ritvijmishra4727
    @ritvijmishra4727 3 года назад +8

    Thank you so much sir for this ML playlist. Your explanations are simple, exact, and extremely easy to follow. The method that you use of first familiarizing us with theory, then with a practical example and then an exercise is really effective. Looking forward to more of such videos in your ML series. Thanks once again, sir.

  • @paulkornreich9806
    @paulkornreich9806 2 года назад +8

    This exercise was a challenge. Thank you. By just taking pure z of the set, some outliers were missed. Basically, all the outliers were the 0s for blood pressure and cholesterol. With those eliminated, I got significantly higher scores than the solution. All bagged models gave a similar 86% accuracy. The biggest jump from non-bagged model to bagged model was the Decision Tree which went from 79% accuracy without bagging to 86% with bagging. Also, I did the exercise several months after this video (was posted - not sure when it was made), so the libraries (especially SVC) may have improved (in their defaults).

  • @khanshian2077
    @khanshian2077 3 года назад +2

    Your tutorial series are teaching me a lot Sir. These are such well organized. You have made these so easier to learn and understand. Hats off to your hard work. A blind follower of you, Sir. Loads of love.

    • @codebasics
      @codebasics  3 года назад +2

      Thanks for your kind words Khan shian 🙏

  • @siddheshmhatre2811
    @siddheshmhatre2811 Год назад +1

    One of the most underrated playlists for ML . I wish lots of student will join ❤

  • @malikhamza9286
    @malikhamza9286 3 года назад

    Thank you so much Sir for teaching us a lot of things. I was searching for here and there for Ensemble learning and you video just showed up. You are life saver. Thanks a lot!!

  • @rahulranjan8682
    @rahulranjan8682 3 года назад

    Thumbs up! You cannot learn swimming by seeing.
    Who takes the pain of providing excercise. When i was trying to learn in the beginning this was what i wanted. But atleast good some1 is providing it now.

  • @danialsoleimany259
    @danialsoleimany259 11 месяцев назад

    The most helpful video for bagging , thank you

  • @SamjhoPaiseKo
    @SamjhoPaiseKo 3 года назад +1

    Explanation is very easy...well understood....👍👍👍

  • @elahe4737
    @elahe4737 2 года назад

    That was clearly describe what is the bagging method, I wish you had a video about Boosting as well

  • @shafinhossain3810
    @shafinhossain3810 8 месяцев назад

    Thanks a lot for providing very necessary and important contents!

  • @dataguy7013
    @dataguy7013 2 года назад +1

    Best explanation, EVER!!

  • @avikaul26
    @avikaul26 6 месяцев назад +1

    great video, best video on the topic

  • @sagarkumarbala5257
    @sagarkumarbala5257 3 года назад

    Just as expected...awesome!!!

  • @upendrar9323
    @upendrar9323 3 года назад +3

    Hi Dhaval! Simple & useful explanation as always. Keep doing more videos.
    However, @11:40 I believe we have to first do train test split & then we should perform standard scaling operation instead of doing the other way. Aren't we running into the problem of data leakage if we do standard scaling on all the data points without train & test split? Let me know your thoughts. Thanks!

    • @codebasics
      @codebasics  3 года назад

      Hey yes the dataset that I showed at the top is actually training dataset. I think I mentioned that in video.

  • @nachiketgalande8125
    @nachiketgalande8125 Год назад

    Thankyou SIR! for this amazing playlist on machine learning

  • @aniketmlk6
    @aniketmlk6 Год назад

    Thanks a lot for your awesome series!

  • @Koome777
    @Koome777 Год назад +2

    My results of the exercise: svm standalone 0.8, after bagging 0.8, Decision Tree standalone 0.65, after bagging 0.79. Bagging helps improve accuracy and reduce overfitting, especially in models that have high variance. Mostly used for unstable models like Decision Trees

  • @60pluscrazy
    @60pluscrazy 3 года назад

    Random forest explanation is superb 👌

  • @PP-tc1zp
    @PP-tc1zp 3 года назад

    Thank you sir for a very good explanation. Those examples are very good to training write a code and cause strong motivation.

  • @ankitjhajhria7443
    @ankitjhajhria7443 Год назад +2

    why are we fitting our model on X,y
    then what is the use of x_train and y_train and no use of scaling also if we are trainning our model on original X and y ?

  • @juniorvela4614
    @juniorvela4614 3 года назад +4

    Is there any tutorial on multi class classification with Deep learning "NLP" (Keras)

    • @_muhammadshahrukh_
      @_muhammadshahrukh_ 3 года назад +2

      You can have as many classes as your problem requires in your DNN or NN. Here’s a playlist from code basics for deep learning projects, check out the potato diseases classification course: ruclips.net/p/PLeo1K3hjS3ut2o1ay5Dqh-r1kq6ZU8W0M

  • @bhanusri3732
    @bhanusri3732 Год назад +1

    Why during cross validation using original unscaled X instead of X scaled? Does it not affect accuracy?

  • @1itech-Learn
    @1itech-Learn Год назад

    Thank you so much sir for this ML playlist

  • @vikranttripathi2258
    @vikranttripathi2258 2 года назад +5

    Thank you for this wonderful explanation. I have a query here. We scaled X but everywhere we use X in cross_val_score. Could you please explain why we scaled X?

    • @OjciecDyktator
      @OjciecDyktator 10 месяцев назад

      I think in the case of this dataset it doesn't matter much. Scaling was applied just in case and in cross_val_score for both X and X_scaled the results are very similar for different models. But yes. More logical to use X_scaled later.

  • @abebebelew2056
    @abebebelew2056 Год назад

    It us very helpful video to do my research project.!!!!!

  • @kushanmadusankha5227
    @kushanmadusankha5227 2 года назад

    Awesome 🔥
    Appreciate your effort bro

  • @sanskaragrawal5074
    @sanskaragrawal5074 2 года назад

    Excellent expanation sir.The whole series has been exceptional.
    Had one query -'How can reduction the size of data set decreasee variance .Decreasing no of features might decrease it,but how decreasing no of training examples can decrease it

  • @SanjeevKumar-nc2rt
    @SanjeevKumar-nc2rt 3 года назад

    Concept cleared 🥰😍😍

  • @LamNguyen-jp5vh
    @LamNguyen-jp5vh 2 года назад +1

    Hi, can you explain further the difference between bagging and bagged trees. I don't really understand the explanation in the video. Thank you so much for your help! Your videos are amazing.

  • @bravelionable
    @bravelionable 3 года назад

    You are the best! Thank you

  • @bea59kaiwalyakhairnar37
    @bea59kaiwalyakhairnar37 2 года назад +1

    You have to do outlier detection because the max is much higher than that of 75% value

  • @slainiae
    @slainiae 10 месяцев назад

    Using standalone model I got a better score than if I used SVC with bagging: 0.902 versus 0.851
    Using standalone decision tree I got 0.782 versus 0.84 with bagging.
    Bagging helps reduce the overfitting (high variance) caused by decision trees by averaging multiple decision trees.

  • @diptopodder1011
    @diptopodder1011 Год назад

    How to train multiple file and then provide them label for individual file and classify a file?

  • @nitinpednekar8872
    @nitinpednekar8872 2 года назад

    Sir, I don't see any time series forecasting model videos, request to upload videos for the same

  • @atur42
    @atur42 2 года назад

    good work really

  • @JoyFay
    @JoyFay 3 года назад

    Thanks for the tutorial

  • @Freeak6
    @Freeak6 2 года назад

    Shouldn't you use X_train in the cross-validation calls?

  • @MES21-99
    @MES21-99 3 года назад

    Where can I find the Standard Scalar explanation?

  • @DrizzyJ77
    @DrizzyJ77 8 месяцев назад

    Thanks code basics

  • @pranav2901
    @pranav2901 2 года назад

    when the boosting will be uploaded ?

  • @ayanibA1805
    @ayanibA1805 3 года назад

    Don't we need to write code from scratch ??? Simply using sklearn libraries is enough for a ds????

  • @troubution
    @troubution 3 года назад +5

    Hi, Dhaval I hope you are doing well, I have a query in this, at step 35 you have provided input as X and y to the model. What if you have provided input as X_scaled instead of X, i think accuracy might be different.

    • @joybhwmck
      @joybhwmck 2 года назад

      @codebasics can you please tell us, if we can use X_scaled instead of X in our models.
      Your videos are great... More power to you...

  • @TitanGriffins
    @TitanGriffins 5 месяцев назад

    shukran 4 the entire pl

  • @pranav2901
    @pranav2901 2 года назад

    thank you very much for this video

  • @vikassengupta8427
    @vikassengupta8427 10 месяцев назад

    Sir, i clicked the link without trying the exercise, my laptop is coughing right now, what can i do sir, nowww😢😢😢

  • @kameshyuvraj7969
    @kameshyuvraj7969 3 года назад +1

    Sir is there any chance of getting job into ds field who have no coding experience and have exp in non it field i.e electrical field? Please help me out sir?

    • @codebasics
      @codebasics  3 года назад

      Yes it is possible. But if course you need to learn coding and other skills to pass an interview

    • @kameshyuvraj7969
      @kameshyuvraj7969 3 года назад +1

      @@codebasicssorry I have not say I been 10 years in electrical field due to financial crisis when I was passout sir so but in carona time I have been learn pthhon for ds by using pandas ,matplotlib,scipy,skit libraries

  • @golisodaofficial5856
    @golisodaofficial5856 2 месяца назад

    Sir..can you explain why you are using StandardScaler method

    • @dummyedits_xd1646
      @dummyedits_xd1646 Месяц назад

      its used for scaling down the data, for ex 0 to 400 >>>>> -2 to 2 in between this range. its about features having high diff

  • @AkaExcel
    @AkaExcel 3 года назад

    Dear @codebasics We would be very grateful if you could teach Stacking tutorial please.

  • @rajagopalk9760
    @rajagopalk9760 3 года назад

    Good presentation and preparation; easy to understand. I wish to get a clarification that, why the term "resampling with replacement" is used instead of "sampling with replacement". Is there incidental or there is any specific reason? Thank you.

  • @PP-tc1zp
    @PP-tc1zp 3 года назад

    Thank you for your courses
    I have differen code to detsct otluiers. This code also works very good. It is more simple.
    Best Regards
    '''Q1 = df.quantile(0.25)
    Q3 = df.quantile(0.75)
    IQR = Q3 - Q1
    outlier_condition = ((df < (Q1 - 1.5 * IQR)) | (df > (Q3 +1.5 * IQR)))
    df3 = df[~outlier_condition.any(axis=1)]
    df3.shape'''

  • @komalparab7175
    @komalparab7175 3 года назад +1

    Waiting for your NLP series .
    Please Please make it.

  • @anmoldubey3375
    @anmoldubey3375 3 года назад

    Thankyou for making such a clear video in bagging and RF.
    I have one doubt in RF, whe RF does rows and feature sampling so in feature sampling, some of the DT might not get relevant features or
    not even the features we might wanna use, so doest this affect accuracy and not let us get the result that we want.
    Ps i know this is a lot of writing!!!!!

  • @arumoysaha4449
    @arumoysaha4449 3 года назад

    I have a question related to K fold cross validation, how do we select the optimize K value for the cross validation technique?

    • @emekaobiefuna4509
      @emekaobiefuna4509 3 года назад +1

      It's selected arbitrarily. Mostly 5 and 10 are mostly used. The larger the number of K the higher computational expensive the process gets.

  • @gargisingh9279
    @gargisingh9279 3 года назад

    Sir can you please share the Machine learning playlist which starts from tutorial 1 . I am not bale to figure the previous tutorials

    • @sourav_basu
      @sourav_basu 3 года назад

      ruclips.net/p/PLeo1K3hjS3uvCeTYTeyfe0-rN5r8zn9rw

  • @snehasneha9290
    @snehasneha9290 3 года назад

    @ 21: 50 in cross Val score you x and y why not x_train and y_train can anyone explain this

  • @arianrahman4840
    @arianrahman4840 3 года назад

    Can we get update on your DL series ?

  • @snehasneha9290
    @snehasneha9290 3 года назад

    by using the df. describe() how can we decide is it necessary to do outlier removal or not please can anyone help me for my question

  • @deb2918
    @deb2918 3 года назад

    sir, why most of the example you give is based on classification .. please give us some example on regression problems..

  • @ogochukwustanleyikegbo2420
    @ogochukwustanleyikegbo2420 Год назад

    I also learnt that bagging doesn't do so much in increasing the performance of the model apart from lowering the variance.

  • @bit-colombo5595
    @bit-colombo5595 2 года назад

    Hi sir can make a video on how to combine classifiers like decision tree, random forest ,naive bayes and svm and get a colleciive result, like a weighted output

  • @tejaswiganti8098
    @tejaswiganti8098 3 года назад

    I dont know why i am getting output and mean as 1 while using DesicionTreeClassifier and RandomForestClassifier,
    I have tried with different values but value is same and not getting the exact reason.
    Can you guys tell me where i have made mistake:|

  • @laxmiswetha2510
    @laxmiswetha2510 3 года назад

    Sir,I have completed my bachelor's degree .so next which course is better for programming and coding .can you explain me .

  • @jayaprasanthr3241
    @jayaprasanthr3241 3 года назад

    How to decide on classifier or regressor after data split ?

    • @its_kumar
      @its_kumar 3 года назад

      It depends on your target value if it is continuous use regression, if it is categorical use classification

  • @venkisayina6063
    @venkisayina6063 3 года назад

    Sir i want to do java certification, can you plz help me sir. I have zero percent knowledge sir. From basics.

  • @बिहारीभायजी
    @बिहारीभायजी 2 года назад

    thanks sir

  • @ogochukwustanleyikegbo2420
    @ogochukwustanleyikegbo2420 Год назад

    My results after completing the exercise
    svm:
    Standalone 0.82
    Bagged model 0.87
    Decision Trees:
    Standalone 0.79
    Bagged model 0.84

  • @tarunmohapatra5734
    @tarunmohapatra5734 3 года назад

    I am waiting for Boosting and Xgboost methods sir

  • @ayushgupta80
    @ayushgupta80 9 месяцев назад +1

    base_estimator is renamed as estimator.

  • @venkisayina6063
    @venkisayina6063 3 года назад

    I have zero percent knowledge in software side sir
    Can u plz help me sir

  • @nastaran1010
    @nastaran1010 Год назад +4

    I hope you see my questions you never response to my questions. why you didi not fit "BaggingClassifier' with '(x_train,y_train)', in exercise?

  • @firedek3208
    @firedek3208 3 года назад

    👍👍

  • @sachinnp3526
    @sachinnp3526 8 месяцев назад

    Sir, u simply use logistics regression

  • @venkisayina6063
    @venkisayina6063 3 года назад

    Sir can you do an video for java sir plz sir

  • @SohamPaul-xy9jw
    @SohamPaul-xy9jw Год назад

    My bagging model score came out to be : 0.8027, SVC : 0.8804, Decision Tree : 0.804

  • @devesh_upreti
    @devesh_upreti Год назад

    SVC score without bagging 0.87
    DecisionTreeClassifier score without bagging 0.76
    SVC score with bagging 0.867
    DecisionTreeClassifier score with bagging 1.0
    Drastic improvement in Decision Tree Classifier

    • @SohamPaul-xy9jw
      @SohamPaul-xy9jw Год назад

      How are you using SVC with bagging. Can you send the code of that?

  • @duonghi6986
    @duonghi6986 9 месяцев назад

    12:04

  • @adamassrkfan
    @adamassrkfan 6 месяцев назад

    9:37

  • @kotakarthik-fq5cp
    @kotakarthik-fq5cp Год назад

    bagging svc gave a far better result than bagging decision tree

  • @coder_62
    @coder_62 Год назад

    O my gad, my computer get fever for 1 month wkwkwwk. Btw thank you sir for your clear explanation.!!!

  • @abdulds9764
    @abdulds9764 3 года назад

    Sir...
    Could you please upload a video about Boosting technique

    • @codebasics
      @codebasics  3 года назад

      Yes that one is coming next

  • @its_kumar
    @its_kumar 3 года назад

    Most important tool for programmers *copy and paste* 👌 😂😂

  • @BathingAfrican
    @BathingAfrican 3 года назад

    I hope you’re feeling better I remember you saying you were sick inshallah

    • @codebasics
      @codebasics  3 года назад

      I am healthy as a horse my friend. Thanks for your care and concern 🙏

  • @HokoLe-e2q
    @HokoLe-e2q 5 месяцев назад +1

    Who else finished the course?! Like if you did! Me too Me too

  • @nikhilraj93
    @nikhilraj93 Год назад

    I tried clicking on soultion
    Now I have fever

  • @SakshiGlakes
    @SakshiGlakes 3 месяца назад

    i am lost

  • @omsaichand752
    @omsaichand752 2 года назад

    Your tutorials are not properly structured and are not learner centric!

  • @sahilgundu5338
    @sahilgundu5338 Год назад

    Im not able to see top row, all column headings in names in CSV file downloaded from kaggle - pima-indians-diabetes.csv
    Am I doing any mistake while downloading?