60 - How to use Random Forest in Python?

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

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

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

    This was excellent. Most tutorials on these stop somewhere in the middle, and never get to the feature importances, which are the entire point of these models. Not sure why, but thanks for being comprehensive.

  • @rominamir8057
    @rominamir8057 4 года назад +7

    great job on explaining, and I loved that you used an actual real dataset!

  • @lakshyavaibhavdatta9098
    @lakshyavaibhavdatta9098 2 года назад +2

    This is a beautiful explanation, man! Thanks! It's my first exposure to actual implementation of ML, and I honestly couldn't have asked for a better walkthrough. Thanks! :)

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

    Thank you for your explanations and detail. This was very helpful in learning a Random Forest with Python.

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

    you are the best please keep it up ! love your teaching High quality content very well explained please create more!! Respect from GREECE !

  • @pontefract
    @pontefract 3 года назад +9

    This is the best random forest tutorial on RUclips, thank you.

  • @PyCode.academe
    @PyCode.academe 3 года назад +1

    Great explaining, thanks a lot, please keep recording videos about ml!!!

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

      Keep watching my channel, you will discover 100s of ML related videos :)

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

    Hi, very nice video! do you have any video which helps to find optimal threshold/cut-off for continuous variables such as age, time. Thanks!

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

    I really need you to help me Sreeni.
    How to find feature importances in image classification problem and determine which GABOR was most impactful?
    Thanks a ton for making these videos.
    You shud know that your videos have impacted a lot of ppl including me. Even "I" could code and do ML coz of you.

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

      May be you will find this video useful: ruclips.net/video/_5t8ZtRybT8/видео.html

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

      Omg. Thanks a lot for your prompt response.
      Btw I tried both Boruta and feature importances. Feature importances is showing me the most important pixels (some 76670th pixel) in the descending order when I expect it to show the filter to which that pixel belonged to.
      I think I am going wrong in some matrix dimension. Would be helpful if u could help me out.
      Really thanks a lot for this .

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

      Wow... Issue sorted after logical thinking.
      Added all the pixel wise importances filter wise
      The filter which has the highest magnitude is most important.

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

    wonderfully explained, sir. I have a question. Is there any way that I can print the prediction in terms of probabilities instead of 1 and 2, similar to light GBM or XGBoost?

  • @Myers-ft6vm
    @Myers-ft6vm 3 года назад

    This is great. Thank you much.

  • @aiz_i564
    @aiz_i564 4 месяца назад

    Thank you so much! Very clear explanation and straight to the point! Thanks a ton, Sir!

  • @davisongudo372
    @davisongudo372 4 года назад +4

    You are precise and to the point, and cover what a learner needs.

    • @DigitalSreeni
      @DigitalSreeni  4 года назад +2

      Thank you for your kind feedback.

    • @cdhanunjay5497
      @cdhanunjay5497 4 года назад

      I am getting accuracy of 1 when i did the same using the iris data set

    • @DigitalSreeni
      @DigitalSreeni  4 года назад +2

      @@cdhanunjay5497 That is highly accurate :)

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

    The fact you use real datasets likely to be used in real life for this script is amazing - thank you. Keep it up

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

    Very good explanation

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

    can you give us the dataset link please !!

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

    well commented code in github double like

  • @NeeRaja_Sweet_Home
    @NeeRaja_Sweet_Home 4 года назад +1

    Nice Intuition!!! Looking forward for more ML concepts.
    Thanks,

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

    @DigitalSreeni when I run this code with my dataset then it shows: "ValueError: Input contains NaN, infinity or a value too large for dtype('float32')." how can I handle this error do you have any source where I can get the solutions and also why I face this problem. I know you are a busy person but it is appreciable if you help me out with this problem.

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

    Thankyou very much, great insights based on real problem. Best wishes.

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

    Thank You so much, Sir, for this video. I have one request for you. Can you please make a video using random forest regression and multivariate regression for the raster dataset, considering the Landsat ETM land use data, ASTER DEM (Elevation data), road network data, etc as independent variables and GDP data as the dependent variable for a region or country or city and please show us how the results changes with these two different regression models. Thank You in advance, Sir.

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

      I keep sharing your videos in our research community, particularly those who are working on GIS, hydrology, earth science, atmospheric science domain. It would be a great help for them if you make a video on this problem.

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

    thank you so much, I couldn't get it from others but you have explained it so good . Because you can explain it to beginners and I highly appreciate it

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

    I have a question please, i am working on my raster dataset for prediction like ANN, RF and CNN, i have converted the rasters into numeric and then train and test the data and got very good accuracy. Now i need to convert my test data into raster again as final prediction map but i don't know how to do this, please guide me thanks.

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

      Same issue here. Would like to get some guidance. Thanks.

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

    20:20: In newer sklearn versions (0.22 +) default n_estimators = 100.

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

    No need to convert categorical to numeric as all tree-based models can natively handle categorical variables

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

    Easy to understand and detailed ,no bla bla bla and codin with out explanation ! Awsome

  • @GATE-DA-CSE-RaviKantGupta
    @GATE-DA-CSE-RaviKantGupta 2 года назад

    Explained well, please consider imbalance case

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

      I’ve recorded videos on working with imbalanced data. Please check them out.

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

    Thank you sir , good implementation of code in python

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

    Can you do video on k fold cross validation

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

      Sure. I will add it to my list. Thanks for the suggestion.

  • @Abhishek-ek9gw
    @Abhishek-ek9gw 3 года назад

    Great sir, Thank you so much for this..❤

  • @f.r8120
    @f.r8120 Год назад

    Straight to the point! I got it at first go. Thank you so much for the tutorial.

  • @MuhammadHassan-lg1ti
    @MuhammadHassan-lg1ti 3 года назад

    how to use gabor features in random forest?

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

    Hi sir, could u plz tell me how to use random forest algorithm for continuous target variable..

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

    SIR WHAT IS ESTIMATOR=10 IN THIS PROGRAM

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

    Great video! Very helpful and explained it very well! Thank You

  • @jubieralonsojimenezcamargo5732

    ¡Thanks Sreeni! Your contents helped me to give that extra mile on my Ph.D. research, kind regards!

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

      Thank you very much for your generous donation. I am glad you found my videos to be useful towards your doctorate. This is exactly the reason why I started my channel - to help students and researchers.

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

    Thanks

  • @nourelislam8565
    @nourelislam8565 4 года назад

    Thanks for ur explanations, I just wondering. What is the impact of Random_state parameter in the algorithm! What is the difference between 20 or any integer and zero or None!!
    Thanks in advance

    • @DigitalSreeni
      @DigitalSreeni  4 года назад +1

      Random_state fixes the random numbers that gets used in the code so you get repeatable results. Otherwise, you end up with different results each time you run the code. The exact seed doesn't matter, but it needs to be the same to generate same random numbers. In reality, random number generators are not random, they use a seed to generate numbers and if the seed is kept constant you will get same random numbers each time.

  • @chiragagrawal7104
    @chiragagrawal7104 4 года назад

    how to tune ccp_alpha value?

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

    yes i found it very very very useful...thank you very much

  • @sridharvishwanath7391
    @sridharvishwanath7391 4 года назад

    Perfect!! Thanks for posting the video!! Very clear explanation. I liked your presentation skills!! Keep it up!

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

    Hi I follow your steps and redo a model, yet I got accuracy = 1 and I don't know how to fix it >< May you give me some advices? or I can email if you need the details thanks!

  • @nethravathis7726
    @nethravathis7726 4 года назад

    I do not comment usually on youtube videos but this tutorial is exceptional. Great explanation.

  • @shivd5235
    @shivd5235 4 года назад

    excellent job! this really helped me to understand random forest and how to apply it.. much appreciated!

  • @aparajuusharani7638
    @aparajuusharani7638 4 года назад

    How can we visualise the decision trees in the random forest

    • @DigitalSreeni
      @DigitalSreeni  4 года назад

      You can do that using export_graphviz. Here is good explanation on how to do it..
      towardsdatascience.com/how-to-visualize-a-decision-tree-from-a-random-forest-in-python-using-scikit-learn-38ad2d75f21c

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

    Great. I wish to perform this model using STATA. Can you please provide any links? thanks!

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

      I am sorry, I have no clue what STATA is!!!

  • @anjanyrisqiati8836
    @anjanyrisqiati8836 4 года назад

    Can we get your data for learning?

    • @DigitalSreeni
      @DigitalSreeni  4 года назад

      Yes, of course. You can find it on my github page: github.com/bnsreenu/python_for_microscopists

  • @ibrahimcetin8656
    @ibrahimcetin8656 4 года назад

    U are the best

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

    While creating Y, it comes valueError: invalid literal for int() with base 10
    How to solve this error sir?

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

      You seem to be converting strings to integer. Please verify where this is happening and fix it. I recommend looking at data types for all variables to find the culprit.

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

      @@DigitalSreeni yes sir I was trying the same
      In this session you were converting good and bad words, in the same way I tried to convert it into integers using different dataset.
      In my dataset it is divided into 7 kinds ,where as in your dataset it was 2 kinds

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

      What changes should I do sir?
      Is there any other methods?

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

      @@akzzz7706 do you get the solution because I also got struck to this problem which you currently facing.

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

      @@hasanshaikh2014 No bro , I tried another method , it's showing valueError: could not convert string to float