Machine Learning Tutorial Python - 11 Random Forest

  Рет қаралды 372,083

codebasics

codebasics

Күн бұрын

Пікірлер: 363
@codebasics
@codebasics 2 жыл бұрын
Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced
@vipulsemwal478
@vipulsemwal478 Жыл бұрын
Hi, I have a question regarding fitting the model. When we do model. fit in every training, there will be a random set of samples for training. For example, in the iris dataset, I fit my model and then fine-tune with n_estimators =10,20,100, etc. sometimes it is getting 1.0 score on 20, but if I run it again, it gets 0.98, so how can I fix the x_train and y_train so it will not change every time. ? And I am really thankful for your lectures I am learning day by day. Thank you.
@sanchit0542
@sanchit0542 5 жыл бұрын
Keeping the tutorial part aside (which is great), I really love your sense of humor and it's an amazing way to make the video more engaging. Kudos!! Also, thank you so much for imparting such great knowledge for free.
@codebasics
@codebasics 5 жыл бұрын
Thanks for your kind words and appreciation shankey 😊
@zerostudy7508
@zerostudy7508 5 жыл бұрын
Lets promote this channel. I am just a humble python hobbies who took local course yet still I don't understand most of the lecturer says. Because this channel i've finally found fun with python. In just 2 weeks(more) I already this Level? Man....! Can't Wait for Neural Network but only from this channel
@srujanjayraj9490
@srujanjayraj9490 5 жыл бұрын
The way you teach or explain the concepts completely different thanks a lot!!!!!! Please make more videos
@kausikkar2587
@kausikkar2587 Жыл бұрын
Sir, I am damn impressed by you!!!! You are the best ML instructor here on YT!!!!
@roodrakanwar3300
@roodrakanwar3300 4 жыл бұрын
I achieved an accuracy of .9736. Earlier, I got an accuracy of .9 when the test size was 0.2 and changing the number of trees wasn't changing the accuracy much. So, I tweaked the test size to .25 and tried different number of tree size. The best I got was .9736 with n_estimators = 60 and criterion = entropy gives a better result. Thank you so much sir for the series. This is the best KZbin Series on Machine Learning out there!!
@lokeshplssl8795
@lokeshplssl8795 4 жыл бұрын
xlabel is the truth and ylabel is the prediction but in the video it is reverse.... Am I right? because we take "confusion_matrix(y_test,y_predicted)"
@panagiotisgoulas8539
@panagiotisgoulas8539 2 жыл бұрын
@@lokeshplssl8795 I think I know why you are probably confused. This not a plot chart. You should not assume that because you passed y_test as a first argument you would see it horizontally similarly you do with xlabel. Unfortunately the confusion matrix is printed out unlabeled. True/Actual/test values are vertically alligned and predicted ones are horizontally. A couple of videos before he used another library to demonstrate the matrix labeled. If you have any questions regarding confusion matrix this is by far the best video kzbin.info/www/bejne/boDSmGqKja2pfLs . Also a similar use case has to do with Bayesian statistics. Another great example kzbin.info/www/bejne/Y2LHioxqaKmFg6M You don't have to get into it since the software does it for you, but it would help understand what is going on
@panagiotisgoulas8539
@panagiotisgoulas8539 2 жыл бұрын
It is a good practice to make a for loop for the n_estimators check the score for one of these: scores=[ ] n_estimators=range(1,51) #example for i in n_estimators : model=RandomForestClassifier(n_estimators=i) model.fit(X_train,y_train) scores.append(model.score(X_test,y_test)) print('score:{}, n_estimator:{}'.format(scores[i-1],i)) plt.plot(n_estimators,scores) plt.xlabel('n_estimators') plt.ylabel(('testing accuracy') And then you can sort of see what's going on. This practice is very useful for knearest neighbors technique for calculating k.
@cololalo
@cololalo 2 жыл бұрын
Thank you! I was looking for something like thi. I think in the fourth line the i is missing, as in model=RandomForestClassifier(n_estimators = i)
@panagiotisgoulas8539
@panagiotisgoulas8539 2 жыл бұрын
@@cololalo yep forgot it thanks.
@fathoniam8997
@fathoniam8997 3 ай бұрын
Thank you, I am trying to find something like this since the previous video!
@adityahpatel
@adityahpatel 3 жыл бұрын
I cannot quite express how amazing teaching you are doing. I am doing masters one of the finest universities in America and this is better than the supervised learning class I am taking there. Kudos! Please keep it up. appreciate you are making this available for free although I would be willing to see your lectures even for a fee.
@codebasics
@codebasics 3 жыл бұрын
Thanks for leaving the feedback aditya
@AbhishekSingh-og7kf
@AbhishekSingh-og7kf 3 жыл бұрын
I can watch this type of videos whole day without take any break. Thank you!!!
@iaconst4.0
@iaconst4.0 3 ай бұрын
eres un excelente profesor!, gracias por compartir tus conocimientos! saludos desde Peru!
@rameshthamizhselvan2458
@rameshthamizhselvan2458 5 жыл бұрын
frankly telling your videos are more neat and clear than anyother videos in the youtube
@codebasics
@codebasics 5 жыл бұрын
Thanks Ramesh for your valuable feedback :)
@tanishqrastogi1011
@tanishqrastogi1011 9 ай бұрын
ok so i read one comment and put test_size = 0.25 and n_estimator = 60. I rerun my test sample cell as well as model.fit and model.predict cell and got the accuracy of 100%. I am having a god complex right now thank you for this amazing series
@Pacificatorrr
@Pacificatorrr 3 ай бұрын
You sir, are a gem! Thank you for this series! I managed to get an accuracy of 98%!
@motox296
@motox296 5 жыл бұрын
Great Video! I'm working on my first project using machine learning and am learning so much from your videos!
@codebasics
@codebasics 5 жыл бұрын
Hey Alex, good luck on your project buddy. I am glad these tutorials are helpful to you :)
@Tuoc_Nguyen
@Tuoc_Nguyen 5 ай бұрын
For Iris Datasets I got score =1 for n_estimators = 40,50,60 Thank sir very much
@spicytuna08
@spicytuna08 3 жыл бұрын
again, just spectacular graphics and easy to understand explanation. thank you so much.
@pablu_7
@pablu_7 4 жыл бұрын
Thank you Sir for this awesome Explanation about RandomForestClassifier . I got score of 1.0 for every increased value in n_estimators
@codebasics
@codebasics 4 жыл бұрын
Nice work!
@chrismagee5845
@chrismagee5845 Жыл бұрын
FYI if you are using version 0.22 or later the default value of n_estimators changed from 10 to 100 in 0.22
@vijaykumarlokhande1607
@vijaykumarlokhande1607 3 жыл бұрын
this is crash course; if you are in hurry; this is the best series out there on youtube
@codebasics
@codebasics 4 жыл бұрын
github.com/codebasics/py/blob/master/ML/11_random_forest/Exercise/random_forest_exercise.ipynb Complete machine learning tutorial playlist: kzbin.info/www/bejne/nZ7Zp5Sll9Jqm7M
@lokeshplssl8795
@lokeshplssl8795 4 жыл бұрын
xlabel is the truth and ylabel is the prediction but in the video it is reverse.... Am I right? because we take "confusion_matrix(y_test,y_predicted)"
@jiyabyju
@jiyabyju 3 жыл бұрын
@@lokeshplssl8795 I do have same question
@lokeshplssl8795
@lokeshplssl8795 3 жыл бұрын
@@jiyabyju I figured it out
@jiyabyju
@jiyabyju 3 жыл бұрын
@@lokeshplssl8795 hope there is no mistake in code..
@lokeshplssl8795
@lokeshplssl8795 3 жыл бұрын
@@jiyabyju no mistake, He took y_predicted as a model of prediction with X_test.
@maruthiprasad8184
@maruthiprasad8184 2 жыл бұрын
I got 93.33 accuracy at n_estimators=30 after that accuracy not increasing w.r.t increase in n_estimators. Thankyou very much for simply great explanation
@sumitkumarsain5542
@sumitkumarsain5542 5 жыл бұрын
Just love ur videos. I was struggling with python. With ur videos was able to get everything in a weeks time. Also completed pandas and bumpy series. I would highly encourage u to start a machine learning course with some real life projects
@anji1164
@anji1164 5 жыл бұрын
Another Great Video. Thanks for that. I got 1.0 as score with n_estimators=1000. Keep doing these kind of great videos. Thank you.
@codebasics
@codebasics 5 жыл бұрын
Anji, it's great you are getting such an excellent score. Good job 👍👏
@praveenkamble89
@praveenkamble89 4 жыл бұрын
I got 100% accuracy with default estimator and random_state=10. Thanks a lot Sir
@codebasics
@codebasics 4 жыл бұрын
Good job Praveen, that’s a pretty good score. Thanks for working on the exercise
@abhinavsharma6633
@abhinavsharma6633 3 жыл бұрын
I got an accuracy of 0.982579 by giving, n_estimators = 100, well 100 is the default value now, and sir, big fan of your teaching 🙂
@codebasics
@codebasics 3 жыл бұрын
Good job Abhinav, that’s a pretty good score. Thanks for working on the exercise
@abhinavsharma6633
@abhinavsharma6633 3 жыл бұрын
@@codebasics sir just wished to get in contact with you, to get a proper guidance
@bhaskarg8438
@bhaskarg8438 2 жыл бұрын
your teaching is superb, and your knowledge sharing to Data Science community is Nobe|. I tried the exercise by giving the criterion = "entropy" got score as 1
@javadkhalilarjmandi3906
@javadkhalilarjmandi3906 4 жыл бұрын
I've done all the Exercise till here. But I was planning not to do it for this video until I saw your last picture! I don't want you to be angry! so I am going to do it right now!
@codebasics
@codebasics 4 жыл бұрын
Ha ha nice. Javad. Wish you all the best 🤓👍
@devendragohare5221
@devendragohare5221 4 жыл бұрын
I Got 100% accuracy!.... by changing criterion = "entropy"
@lokeshplssl8795
@lokeshplssl8795 4 жыл бұрын
xlabel is the truth and ylabel is the prediction but in the video it is reverse.... Am I right? because we take "confusion_matrix(y_test,y_predicted)"
@carti8778
@carti8778 2 жыл бұрын
@@lokeshplssl8795 it doesn’t change much, i mean u are just transposing the confusion matrix. The info still remain the same
@Moukraan
@Moukraan 3 жыл бұрын
Thank you very much! This tutorial is really amazing!
@sagnikmukherjee8954
@sagnikmukherjee8954 4 жыл бұрын
n_estimators = 10, criterion = 'entropy' led to a 100% accurate model !! Thanks!
@codebasics
@codebasics 4 жыл бұрын
Great job Sagnik :) Thanks for working on exercise
@sagnikmukherjee8954
@sagnikmukherjee8954 4 жыл бұрын
@@codebasics My pleasure ! Amazing tutorials !! Been a great learning experience so far ! Cheers :)
@jyothishp143
@jyothishp143 5 жыл бұрын
This is the only channel i subscribed.
@codebasics
@codebasics 5 жыл бұрын
J Es, thanks. I am happy to have you as a subscriber 👍😊
@MazlumDincer
@MazlumDincer 4 жыл бұрын
n_estimators = 1 (also 290 or bigger) is even made accuracy %100 but, as all we know , this type of datasets are prepared for learning phases, so making %100 accuracy is so easy as well.
@lakshyasharma24
@lakshyasharma24 4 жыл бұрын
Sir I got score=1.0 for estimator=10 And random_state=10 Very nice explanation👌👌👌
@codebasics
@codebasics 4 жыл бұрын
Great score. Good job 👌👏
@usmanafridi9668
@usmanafridi9668 3 жыл бұрын
Best explanation of Random Forest!!!!!!
@codebasics
@codebasics 3 жыл бұрын
I am happy this was helpful to you.
@allahbakshsheikdawood466
@allahbakshsheikdawood466 4 жыл бұрын
Nice to watch your videos.. you make us understand things end to end !!
@codebasics
@codebasics 4 жыл бұрын
👍😊
@harshalbhoir8986
@harshalbhoir8986 Жыл бұрын
This is so awesome explanation!! Thank you so much!!!
@RustemShaimagambetov
@RustemShaimagambetov 5 жыл бұрын
Man, its great! Your videos is best i have seen ever about machine learning. Its very helpfull material. I am waiting when you make tutorial about gradient boosting and neural networks. I think you can make easily to report it. Thanks!
@igorsmet1123
@igorsmet1123 3 жыл бұрын
Thank you so much for very dynamic and clear content with the ideal depth on the topic details
@codebasics
@codebasics 3 жыл бұрын
Glad it was helpful!
@rajmohammed8134
@rajmohammed8134 2 жыл бұрын
Thank you for such wonderful videos, I got accuracy score a 1 in the exercise question
@VivekKumar-li6xr
@VivekKumar-li6xr 5 жыл бұрын
Hello Sir, I have started learning pandas and ML from your channel, and i am amazed the way you are teaching. For Iris Datasets I got score =1 for n_estimators = 30
@codebasics
@codebasics 5 жыл бұрын
Great Vivek. I am glad you are working on exercise. Thanks 😊
@geethanjaliravichandhran8109
@geethanjaliravichandhran8109 3 жыл бұрын
Hi sir,i did your exercise of iris data and got an accuracy of 1.0 with n_estimators=80
@talharauf3111
@talharauf3111 2 жыл бұрын
Sir I have Done the Exercise with 100% Accuracy
@veeek8
@veeek8 Жыл бұрын
You made that so simple thank you so much
@harishdange9048
@harishdange9048 3 жыл бұрын
from sklearn.ensemble import RandomForestClassifier rf = RandomForestClassifier(n_estimators=30) rf.fit(X_train,Y_train) Output: RandomForestClassifier(n_estimators=30) rf.score(X_test,Y_test) output: 1.0 from sklearn.metrics import confusion_matrix cm = confusion_matrix(Y_test,Y_pred) cm output: array([[11, 0, 0], [ 0, 8, 0], [ 0, 0, 11]], dtype=int64)
@ashish31416
@ashish31416 2 жыл бұрын
You are amazing brother. I really loved this. You made it so simple. Thank you so much.
@James-pe3wl
@James-pe3wl 4 жыл бұрын
Maybe I am a bit late jumping on the train, even though, I still want to say thank you for everything you have been doing. Your videos are much better to understand the field rather than the courses of top class Universities such as MIT. I have to say that you outperform all your competitors in a very simple way. As far as I know you had some problems with your health and I hope everything is good now. Wish you good luck and stay healthy at least for your KZbin community. ^_^
@codebasics
@codebasics 4 жыл бұрын
Hey Yea James, thanks for checking on my health. You are right, I was suffering from chronic ulcerative colitis and last year 2019 had been pretty rought. But guess what I cured it using raw vegan diet, ayurveda and homeopathy. I am 100% all right and symptoms free since past 10 months almost and back in full force doing youtube tutorials :)
@prvs2004
@prvs2004 4 жыл бұрын
@@codebasics Good to hear, Things are working out in a positive way! Be safe and I pray everything works well in the long run. Jai SriRam
@ashishsinha8893
@ashishsinha8893 5 жыл бұрын
It's nice to see you bhaiya again
@ajaykumaars2154
@ajaykumaars2154 4 жыл бұрын
Hi Sir, Can we use any other model (eg: svm) with the random forest approach, that is, by creating an ensemble out of 10 svm models and getting a majority vote? Thank you for the wonderful video.
@rajatbhalla1455
@rajatbhalla1455 5 жыл бұрын
Sir u r great thnx for these kinds of videos please make more videos 😊😊😊😊
@rajatbhalla1455
@rajatbhalla1455 5 жыл бұрын
Sir make more videos
@vishank7
@vishank7 4 жыл бұрын
This is sooo awesome! Amazing work sir💎
@tk1215
@tk1215 5 жыл бұрын
Amazing, I like how you explain simply
@muhammedrajab2301
@muhammedrajab2301 4 жыл бұрын
I am not afraid of you, but I respect you! So I am gonna do the exercise right now!
@shivamtyagi5614
@shivamtyagi5614 4 жыл бұрын
default 100 n_estimators or 20 n_estimator , each case it gives 1.0 accuracy. well after getting on this channel , i can feel the warmth on the tip of my fingers.
@adarshkesarwani6775
@adarshkesarwani6775 4 жыл бұрын
Thanks a lot sir for the videos, I wanna know when to use random forest or just tree?
@sohamnavadiya992
@sohamnavadiya992 5 жыл бұрын
Amazing man, keep it up and share more tutorial like this.
@alokpratap2094
@alokpratap2094 5 жыл бұрын
Again a nice video from you. Sir I have one general question. What is random_state and why we sometime take 0 and sometimes we assign value to it. What's the significance of this.
@vijaydas2962
@vijaydas2962 5 жыл бұрын
Thanks for another post.. It's really helpful.... Just a question- Considering the fact that Random forest takes the majority decision from multiple decision trees, does it imply that Random forest is better than using Decision tree algorithm? How do we decide when to use Decision tree versus Random forest?
@kpl_sh
@kpl_sh 4 жыл бұрын
Thank you sir...I got 100% accuracy with n_estimator 90
@codebasics
@codebasics 4 жыл бұрын
Good job Kapil, that’s a pretty good score. Thanks for working on the exercise
@ousmanelom6274
@ousmanelom6274 3 жыл бұрын
thank you for this tutorial how to visualize randomforest and decision tree
@AlvinHampton-rz2iz
@AlvinHampton-rz2iz Жыл бұрын
What makes you put truth on the y_label and predicted on the x_label?
@mycreations3452
@mycreations3452 5 жыл бұрын
Please upload frequently..we will wait for you
@VIVEK-ld3ey
@VIVEK-ld3ey 2 жыл бұрын
Sir how are you deciding the xlabel and ylabel in the heatmap
@jaydhumal2610
@jaydhumal2610 Ай бұрын
I got the perfect score of 1 when I set n_estimators to 40 although the selection of train,test data would also have been contributed in the accuracy of model.
@ericwr4965
@ericwr4965 4 жыл бұрын
Thank you so much. I need some help on this classifier for my data set. This helped a lot.
@codebasics
@codebasics 3 жыл бұрын
Glad it helped!
@freecodecamp
@freecodecamp 5 жыл бұрын
This is a great series! Would you be interested in allowing us to repost it on our channel? We'll link to your channel in the description and comment section. Send me an email to discuss further: beau [at] [channelname]
@ShubhamSharma-to5po
@ShubhamSharma-to5po 4 жыл бұрын
mega.nz/file/LaozDBrI#iDkMIu6v-aL9fMsl-X1DETkOqnMqwptkn54Z51KINyw (like data in this file )//help if anyone understand. mega.nz/file/LaozDBrI#iDkMIu6v-aL9fMsl-X1DETkOqnMqwptkn54Z51KINyw (like data in this file )//help if anyone understand.
@ShubhamSharma-to5po
@ShubhamSharma-to5po 4 жыл бұрын
sir, can you tell me how to plot random forest classification with multiple independent variables.so confused in that
@codebasics
@codebasics 3 жыл бұрын
yes sure. go ahead. You can post it.
@aishwaryakilledar1742
@aishwaryakilledar1742 3 жыл бұрын
Very nice sir.... Expecting more videos 😀
@codebasics
@codebasics 3 жыл бұрын
Glad it was helpful!
@granothon8054
@granothon8054 2 жыл бұрын
Excellent. Thank you.
@dickson9877
@dickson9877 7 ай бұрын
I see many people is saying that in Irises they had 1.0 with 50+ esitmators. I am just starting with ML but for me 4 functions in Irises means that we don't need much estimators, there is actually only 6 unique combinations of functions. 10 if we used also solo columns as estimators which I presume is not happening. Am I correct that anything beyond 6 estimators shouldn't improve the model?
@hanfeng32
@hanfeng32 5 жыл бұрын
very Great video!!!!! thanks
@codebasics
@codebasics 5 жыл бұрын
glad you liked it Han
@shukur533
@shukur533 9 ай бұрын
train_test_split test size is 20% and the random state is 32 1. n_estimators default test score is 0.96 2. The best test score is 1.0 and n_estimators is 3
@bikram40
@bikram40 4 жыл бұрын
Nice explanation as always. Great work.
@meenakshimalik7102
@meenakshimalik7102 2 жыл бұрын
Hi Sir, we are blessed that we got your videos on youtube. Your videos are unmatchable. I am interested in your upcoming python course. When can I expect starting of the course?
@codebasics
@codebasics 2 жыл бұрын
Python course is launching in June, 2022. Not sure about exact date though
@pranaymitra7565
@pranaymitra7565 3 жыл бұрын
Great content!! I have a question though, shouldn't the xlabel be 'Truth' and ylabel be 'Predicted' ?
@iam_Oteknonso
@iam_Oteknonso Жыл бұрын
i though the same thing as well
@iradukundapacifique987
@iradukundapacifique987 4 жыл бұрын
100% accuracy on the given exercise. I used n_estimators = 1
@codebasics
@codebasics 4 жыл бұрын
That’s the way to go Iradukunda, good job working on that exercise
@mohamedabouobayd1992
@mohamedabouobayd1992 5 жыл бұрын
Love your videos. They're helping me a lot. thanks
@codebasics
@codebasics 5 жыл бұрын
Hey Mohamed, Thanks for nice comment. Stay in touch for more videos.
@RubiPandey-l6j
@RubiPandey-l6j 11 ай бұрын
You r God for me for helping me phd
@codebasics
@codebasics 11 ай бұрын
🙌Woohoo! So glad it hit the mark for you! 😃
@jeminceman4211
@jeminceman4211 3 жыл бұрын
This video was amazing. Thanks!
@jyothishp143
@jyothishp143 5 жыл бұрын
Nice videos, Your videos are the best..Keep doing
@codebasics
@codebasics 5 жыл бұрын
Jyothish, I am happy this was helpful to you.
@usamarehmanyousaf2010
@usamarehmanyousaf2010 3 жыл бұрын
Hi, just want to ask this question that, in a data set split why should we drop the target column. Like that is the actual or final result that either the row is true or false. Then while spliting why should we have to drop that?
@vaishalibhat3741
@vaishalibhat3741 6 ай бұрын
test_size=0.2 model=RandomForestClassifier(n_estimators=10,criterion='gini') model.score = 1 2) RandomForestClassifier(criterion='entropy', n_estimators=10) model.score = 1 3) test_size=0.35 RandomForestClassifier(n_estimators=10,criterion='gini') model.score=0.9811 4) test_size=0.35 RandomForestClassifier(n_estimators=10,criterion='entropy') model.score=0.9811
@dineshjangra7413
@dineshjangra7413 4 жыл бұрын
Way of teaching is very good.....sir plz make a vedio on how to give our image to it....how to convert our image like mnist dataset as there is benefit till the time we will use our images
@codebasics
@codebasics 4 жыл бұрын
Sure I am going to add image classification tutorial.
@dineshjangra7413
@dineshjangra7413 4 жыл бұрын
@@codebasics thanks sir
@larrybuluma2458
@larrybuluma2458 4 жыл бұрын
Thank you so much for this tutorial my accuracy score is 0.9666667 with n_estimators at 40
@codebasics
@codebasics 4 жыл бұрын
That's a great score larry. Good job 👍👏
@aashikasharma1616
@aashikasharma1616 4 жыл бұрын
I didn't understand the "number of random forests".
@supra20000000
@supra20000000 2 жыл бұрын
The R2 we got is for test set (R2test), what about the model's R2 which is generally termed as R2training
@unamattina6023
@unamattina6023 2 жыл бұрын
i don't see RandomForestClassifier parameters just like you do, it is just RandomForestClassifier() for me at 8.25. What I am missing?
@КоробкаРобота
@КоробкаРобота 3 жыл бұрын
I got 0.9333 with 90 trees. Thanks!
@codebasics
@codebasics 3 жыл бұрын
Good job Коробка, that’s a pretty good score. Thanks for working on the exercise
@boooringlearning
@boooringlearning 3 жыл бұрын
excellent lesson!
@codebasics
@codebasics 3 жыл бұрын
Glad it was helpful!
@2015murat
@2015murat 5 жыл бұрын
great videos! thank you so much
@jrajpal5
@jrajpal5 2 жыл бұрын
Hi sir, i have a simple query regarding jupyter notebook. I can't see the parameters of randomforestclassifier() after applying model.fit() Is there any way to see those parameters
@sonikusum3
@sonikusum3 Жыл бұрын
I am new to machine learning. Why am I not getting the same numbers as you did for the confusion matrix or scores? I used exactly the same coding as in the video.
@saltsea9499
@saltsea9499 Жыл бұрын
Does sklearn offer a validation training method?
@late_nights
@late_nights 4 жыл бұрын
The default value of n_estimators changed from 10 to 100 in 0.22 version of skllearn. i got accuracy of 95.56 with n_estimators = 10 and for 100 the same.
@izharkhankhattak
@izharkhankhattak 3 жыл бұрын
Nice work.
@ahmedakmal1545
@ahmedakmal1545 2 жыл бұрын
I got 100% accuracy after tuning the parameters and train test split for the iris dataset test_size=0.2, n_estimators=20, random_state=2
@anujvyas9493
@anujvyas9493 4 жыл бұрын
Solved the exercise problem. With model = RandomForestClassifier(n_estimators=10) got an accuracy of 0.96667 and with model = RandomForestClassifier(n_estimators=20) got 1.0
@codebasics
@codebasics 4 жыл бұрын
Anuj, good job 👍👏👌
@anujvyas9493
@anujvyas9493 4 жыл бұрын
@@codebasics Thanks sir! Its all because of you 😊
@snehasneha9290
@snehasneha9290 4 жыл бұрын
sir suppose to consider the 4 decision trees in that 2 trees give the same output and another 2 trees give the same output then which one considered both having the majority at that time plz clarify this doubt
@aliasjad9560
@aliasjad9560 3 жыл бұрын
this video is very helpful .
@codebasics
@codebasics 3 жыл бұрын
Glad it was helpful!
@ogochukwustanleyikegbo2420
@ogochukwustanleyikegbo2420 Жыл бұрын
I did the exercise and I got a score of 0.9 with 20 estimators, 0.93 with 50 estimators and 0.9 with 100 estimators
@arijitRC473
@arijitRC473 5 жыл бұрын
Result of exercise: Score is always 96.66 percent If i will change n_estimators or will increase it, the score is not changing
@IntegralKing
@IntegralKing 4 жыл бұрын
are you re-running the fit? because it fit doesn't automatically rerun after changing the parameters
@jessehahka
@jessehahka 4 жыл бұрын
Is it possible to predict a set of numbers that will output from a random number generator, finding the algorithm, in order to duplicate the same pattern of results?
Machine Learning Tutorial Python 12 - K Fold Cross Validation
25:20
Machine Learning Tutorial Python - 9  Decision Tree
14:46
codebasics
Рет қаралды 531 М.
didn't manage to catch the ball #tiktok
00:19
Анастасия Тарасова
Рет қаралды 33 МЛН
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 122 МЛН
How it feels when u walk through first class
00:52
Adam W
Рет қаралды 23 МЛН
Random Forest Algorithm Clearly Explained!
8:01
Normalized Nerd
Рет қаралды 621 М.
Random Forest Regressor in Python: A Step-by-Step Guide
15:21
Ryan & Matt Data Science
Рет қаралды 10 М.
ML Was Hard Until I Learned These 5 Secrets!
13:11
Boris Meinardus
Рет қаралды 327 М.
StatQuest: Random Forests Part 1 - Building, Using and Evaluating
9:54
StatQuest with Josh Starmer
Рет қаралды 1,1 МЛН
Tutorial 43-Random Forest Classifier and Regressor
10:18
Krish Naik
Рет қаралды 405 М.
RICHARD DAWKINS STRUGGLES WITH BRET WEINSTEIN ON EVOLUTION!?...
15:02
All Machine Learning algorithms explained in 17 min
16:30
Infinite Codes
Рет қаралды 231 М.
AI, Machine Learning, Deep Learning and Generative AI Explained
10:01
IBM Technology
Рет қаралды 379 М.
Visual Guide to Random Forests
5:12
Econoscent
Рет қаралды 79 М.
Machine Learning Tutorial Python - 10  Support Vector Machine (SVM)
23:22
didn't manage to catch the ball #tiktok
00:19
Анастасия Тарасова
Рет қаралды 33 МЛН