Machine Learning Tutorial Python - 8 Logistic Regression (Multiclass Classification)

  Рет қаралды 288,726

codebasics

codebasics

Күн бұрын

Пікірлер: 442
@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
@Charmingenby
@Charmingenby 3 жыл бұрын
There are very few teachers who actually make us fall in love with learning. You have an incredibly fascinating way of teaching Sir!!
@codebasics
@codebasics 3 жыл бұрын
😊👍
@ritikpratapsingh9128
@ritikpratapsingh9128 4 жыл бұрын
I do not usually comment but you wrote the code so simple and explained so beautifully that i had to praise you. Thank you so much !!
@codebasics
@codebasics 4 жыл бұрын
Complete machine learning tutorial playlist: kzbin.info/www/bejne/nZ7Zp5Sll9Jqm7M
@anujvyas9493
@anujvyas9493 4 жыл бұрын
I solved the exercise and my model got an accuracy of 96.67% Thanks for making such great videos.
@sonalgarg5628
@sonalgarg5628 4 жыл бұрын
@@anujvyas9493 can you please send the solution..i also got same accuracy but unable to do prediction
@anujvyas9493
@anujvyas9493 4 жыл бұрын
@@sonalgarg5628 Sure! Email ID ?
@sonalgarg5628
@sonalgarg5628 4 жыл бұрын
@@anujvyas9493 sonal.garg@gla.ac.in
@anujvyas9493
@anujvyas9493 4 жыл бұрын
@@sonalgarg5628 Sent it to you! Sorry for the late reply.
@peiyuankao1213
@peiyuankao1213 5 жыл бұрын
Thanks for your teaching! I like your tutorials and exercises, that make me quickly understand.
@maruthiprasad8184
@maruthiprasad8184 2 жыл бұрын
I got accuracy 93% for iris data set. Thank you very much to make ML simple.
@rayithki
@rayithki 2 жыл бұрын
Thank you. I wish I had discovered your channel 6 months ago. I could have saved so much time.
@PoojaPatel-bi4wr
@PoojaPatel-bi4wr Жыл бұрын
Sir , Whatever you teach it's very very interesting and I think I am luckiest person which I am reading from your videos It's very helpful for us and you are great. I have seen many videos but no one teaches like you.
@Ankurkumar14680
@Ankurkumar14680 5 жыл бұрын
Great tutorial, thanks a ton for shaing this amazing stuff. Request you to start a series on NLP, Deep Learning or Text Analytics
@SohamPaul-xy9jw
@SohamPaul-xy9jw Жыл бұрын
Thank You. After watching previous 8 videos, I tried this Iris exercise on my own and my model actually predicted so well, with a score of 1.0
@satyazigyansu6873
@satyazigyansu6873 9 ай бұрын
it is overfitting bro
@parththakor7362
@parththakor7362 5 ай бұрын
@@satyazigyansu6873 accuracy is varies with random state and test size random state = 42 and test size = 0.2 then accuracy = 100% random state = None and test size = 0.3 then accuracy is around 97% and it varies every time
@yashchaudhari5289
@yashchaudhari5289 3 ай бұрын
@@satyazigyansu6873 no brother it depends on dataset whether it is testing or training. If it is on testing dataset then it is not overfitting, if it is is on training dataset then it is overfitting.
@wsgsantos
@wsgsantos 5 жыл бұрын
As always great video. Greetings from Brazil!
@jagjeetagarwal1856
@jagjeetagarwal1856 2 жыл бұрын
Within 2 Days I have addicted to this channel......I am on this Channel for around 5-6 hours Continuously....... Please Continue the Series......Thanks
@jayshreedonga2833
@jayshreedonga2833 Жыл бұрын
Thanks sir. Simply you are great for such type of free courses.Nice service to society
@stanlukash33
@stanlukash33 3 жыл бұрын
I CAN'T SAY THIS ENOUGH - THANK YOU!
@pallawkumar9846
@pallawkumar9846 5 жыл бұрын
Thank you for these awesome tutorials. Please upload next tutorials.
@-theworldofscience4153
@-theworldofscience4153 2 жыл бұрын
The contents are actually very engaging and helps u tolearn complex topics very easily
@masterofnone754
@masterofnone754 3 жыл бұрын
probably the best tutorial series for beginner thank you!!!!!
@codebasics
@codebasics 3 жыл бұрын
Glad it was helpful!
@nitinsrivastava2136
@nitinsrivastava2136 5 жыл бұрын
Awesome. Thanks for sharing. I love the way you teach topics. So easy to understand. Thanks again.
@codebasics
@codebasics 5 жыл бұрын
Yup nitin, things don't have to be taught in a hard way.. there is always an easy way to explain the concepts :)
@tcsanimesh
@tcsanimesh 5 жыл бұрын
Your explanation is at a different level. Just one request please add the different machine learning algorithms a bit fast as once someone starts leading from your channel gets hooked up to it ...
@nishkarshaggarwal2692
@nishkarshaggarwal2692 3 жыл бұрын
you are a great teacher.... thank u for this series
@liangyumin9405
@liangyumin9405 5 жыл бұрын
Nice tutorial, I have forked your project PY .THX
@rehanabbas4661
@rehanabbas4661 Жыл бұрын
Respect and appreciation from 🇵🇰 . Interesting teaching skill. 👍
@jyotimalik8960
@jyotimalik8960 2 жыл бұрын
finalllllly I understood how to interpret confusion matrix for multiclass classification thankyou!!!!
@yoniziv
@yoniziv 3 жыл бұрын
Very clear, thank you!
@muskan_salampuria
@muskan_salampuria 4 жыл бұрын
One of the best tutorial... Thankyou so much...It is very helpful and informative.... I wish to see more videos on other topics...
@codebasics
@codebasics 4 жыл бұрын
Glad, you liked it.
@Kikeina
@Kikeina 5 жыл бұрын
A little detail... after updating sklearn to version 0.20.2 or higher it will be needed to specify a solver and multi_class specification as parameters to avoid warning errors. For instance "model = LogisticRegression(solver = "newton-cg", multi_class="auto")"
@russnagel1
@russnagel1 3 жыл бұрын
Thank you very much. You just saved me a big headache. I had the warning and came looking to the comments for help. Great job.
@Kikeina
@Kikeina 3 жыл бұрын
@@russnagel1 Happy to see that the comment is helping somebody. You made my day.
@dhruvpathak1850
@dhruvpathak1850 Жыл бұрын
Very helpful, I tried using max_iter / n_iter to 200, in the model.fit() part, but that didn't work either.. eventually, it's your suggestion that did work!
@drpebba2679
@drpebba2679 Жыл бұрын
my savior
@dixxanta
@dixxanta 10 ай бұрын
u can also use standard scaler
@mabelkarani
@mabelkarani 3 жыл бұрын
at 7:50 , use this >> model = LogisticRegression(solver='lbfgs',class_weight='balanced', max_iter=10000) to avoid this warning >>> 'ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT.'
@harsh2014
@harsh2014 3 жыл бұрын
Thank You Mabel Karani , you helped me !
@tanvirahmed552
@tanvirahmed552 2 жыл бұрын
thanks 😊
@muhammadtayyab2148
@muhammadtayyab2148 Жыл бұрын
thks
@aaditstudent
@aaditstudent Жыл бұрын
@@muhammadtayyab2148 what was ur accuracy score using the above parameters?
@palurikrishnaveni8344
@palurikrishnaveni8344 Жыл бұрын
Thank you madam
@kashifahmad93
@kashifahmad93 3 жыл бұрын
Got 96.66% accuracy.....while practicing on your given iris.csv dataset...I am new on your channel, but got addicted to your videos, especially to the playlist of machine learning... please keep teaching us in same way. Thanks a lot..
@codebasics
@codebasics 3 жыл бұрын
That’s the way to go Kashif, good job working on that exercise
@RahulRaj-cy1xb
@RahulRaj-cy1xb 2 жыл бұрын
Bro we need to download exercise from kaggle? As sir only uploaded image on github
@parththakor7362
@parththakor7362 5 ай бұрын
@@codebasics accuracy is varies with random state and test size random state = 42 and test size = 0.2 then accuracy = 100% random state = None and test size = 0.3 then accuracy is around 97% and it varies every time
@jawadasif8130
@jawadasif8130 2 жыл бұрын
really appreciate your hard work. from your videos it was super easy to learn the concept . thank you
@codebasics
@codebasics 2 жыл бұрын
You are most welcome
@pakpoomtivarkornkit8525
@pakpoomtivarkornkit8525 5 жыл бұрын
Thank you so much....liked and subscribed.
@yourlifeonpower
@yourlifeonpower 4 ай бұрын
Another awesome video! Thank you
@vinodkinoni4863
@vinodkinoni4863 5 жыл бұрын
thanks for good tutorials
@rakeshg2926
@rakeshg2926 5 жыл бұрын
Thanks your tutorials are very clear and intutive and easy to understand.
@codebasics
@codebasics 5 жыл бұрын
Rakesh, thanks for your kind words of appreciation
@raghuvamsiyaram7248
@raghuvamsiyaram7248 Жыл бұрын
I got 96.66 accuracy. Thanks.
@rishipatel2221
@rishipatel2221 3 жыл бұрын
Thank you so much for this invaluable series
@codebasics
@codebasics 3 жыл бұрын
Glad you enjoy it!
@strongsyedaa7378
@strongsyedaa7378 2 жыл бұрын
@@codebasics Kindly make a video on confusion matrix multiclass classification please 🙏
@MdAbdurRahaman-f2d
@MdAbdurRahaman-f2d 7 күн бұрын
one thing i don't understand. in the heat map, you said, if the number was not zero, the model accuracy failed there. but in the first example, 37 times I fed my model zero, and my model said it was zero. same as like, 40 times i fed one and my model said it to be one. So, the accuracy is perfect with not being zero in the diagonal part of heatmap. thanks a lot for your marvelous effort
@rajatpati8808
@rajatpati8808 5 жыл бұрын
Waiting for your next videos. Hope you will upload soon.
@rambaldotra2221
@rambaldotra2221 3 жыл бұрын
Iris dataset -> 97.777777777777 accuracy with test_size =0.3 I have fallen in love with this amazing knowledge 🤩.Thanks a lot Sir ❤️.
@oilidzaghloul3266
@oilidzaghloul3266 3 жыл бұрын
I got an accuracy of 1 with test_size=0.2.
@RahulRaj-cy1xb
@RahulRaj-cy1xb 2 жыл бұрын
Bro we need to download exercise from kaggle? As sir only uploaded image on github
@nandithass7326
@nandithass7326 19 күн бұрын
pls provide the code
@dennisasamoah2213
@dennisasamoah2213 4 жыл бұрын
simply amazing
@mohammedashfaqueaslam2566
@mohammedashfaqueaslam2566 4 жыл бұрын
Amazing content you make it all seem easy
@codebasics
@codebasics 4 жыл бұрын
Glad you liked it Mohammed.
@vdud007
@vdud007 4 жыл бұрын
Thank you and practice exercises are useful as well
@codebasics
@codebasics 4 жыл бұрын
Glad you liked the exercises Vishnu
@nastaran1010
@nastaran1010 7 ай бұрын
Thanks a lot, very clear
@golammuktadir4355
@golammuktadir4355 4 жыл бұрын
Good approach for coding the basic machine learning . Carry on
@codebasics
@codebasics 4 жыл бұрын
👍😊🙏
@achelias8477
@achelias8477 3 жыл бұрын
On my way to watch your whole playlist. You are a great techer! I got accuracy 95.6%
@codebasics
@codebasics 3 жыл бұрын
👍😊 wish you all the best
@olutokijohn
@olutokijohn 2 жыл бұрын
Can you share your solution ?
@aaditstudent
@aaditstudent Жыл бұрын
What parameters did you use for the LogisticRegression model?
@safwansalehjee7961
@safwansalehjee7961 5 жыл бұрын
Is there no Exercise solution?
@hamzanaeem4838
@hamzanaeem4838 3 жыл бұрын
Excellent explanation
@nicojapasmusic
@nicojapasmusic 3 жыл бұрын
Very helpful, thanks!
@codebasics
@codebasics 3 жыл бұрын
Glad it was helpful!
@javi19841000
@javi19841000 4 жыл бұрын
Great job, Thank you ver much
@codebasics
@codebasics 4 жыл бұрын
Glad you liked it!
@radhedhabas
@radhedhabas 7 ай бұрын
I got accuracy of 96.66%. Thank you so much for your initiative. Best part of your playlist is exercises that give confidence and a clarity how to apply logics in form of code. And best part you talk about practical use cases.
@parththakor7362
@parththakor7362 5 ай бұрын
accuracy is varies with random state and test size random state = 42 and test size = 0.2 then accuracy = 100% random state = None and test size = 0.3 then accuracy is around 97% and it varies every time for best way choose random state = 42 or 10
@nandithass7326
@nandithass7326 19 күн бұрын
pls provide the code
@radhedhabas
@radhedhabas 19 күн бұрын
@@nandithass7326 please look exercise section in given notebook: colab.research.google.com/drive/1ayUBBqEvH-mDkYHVqMFO6-nlWRyZhyNt?usp=sharing, as I'm using sklearn, accuracy varies every time.
@abhishekkhare6175
@abhishekkhare6175 3 жыл бұрын
got accuracy of 93.34%. Thanku very much really addicted to your videos.
@codebasics
@codebasics 3 жыл бұрын
Well done
@tanoychowdhury6375
@tanoychowdhury6375 5 жыл бұрын
Sir, Please make videos on other topics of machine learning like k nearest neighbour , support vector machines. Your videos are very very helpful. please continue this series.🙏🙏
@orangewares
@orangewares 5 жыл бұрын
You can refer to videos of sentdex. The videos are much better including k nearest neighbor. kzbin.info/www/bejne/hXjbmKF-bd5lhK8
@nareshjanjirala472
@nareshjanjirala472 5 жыл бұрын
nice tutorila.... by watching your tutorials lot of people are opeining institutes in Hyderabad
@codebasics
@codebasics 5 жыл бұрын
Ha ha.. are you serious? 😊
@tewatiakuldeep86
@tewatiakuldeep86 5 жыл бұрын
Sir your way of describing things is very easy to grab and understand. Thank you for the tutorial. I request you to please also make a few videos of analyzing data (statistics) before using it into a model. Like variable correlation, and what variable should be used and which one should be dropped, etc.
@codebasics
@codebasics 5 жыл бұрын
point noted kuldeep and thanks for your appreciation. I want to add lot more content but unfortunately facing health troubles. once i recover I will be back with full force :)
@nayyershahzad8051
@nayyershahzad8051 3 жыл бұрын
I got 96.66% accuracy for Iris dataset exercise. Great work! Thoroughly enjoying and learning a lot from your courses.
@digvijaymahamuni7722
@digvijaymahamuni7722 3 жыл бұрын
i got 94.73% does it vary? or have I done any mistakes?
@fazalahmad1546
@fazalahmad1546 3 жыл бұрын
I got 100.0%
@fazalahmad1546
@fazalahmad1546 3 жыл бұрын
@@digvijaymahamuni7722 this is due to a very small dataset
@mohammedsohilshaikh6831
@mohammedsohilshaikh6831 3 жыл бұрын
@@fazalahmad1546 check for overfitting
@mdlwlmdd2dwd30
@mdlwlmdd2dwd30 3 жыл бұрын
Hey guys chill it isnt like you guys working in backend developing library. also it is relatively clean dataset already.
@franky0226
@franky0226 4 жыл бұрын
Thank you so much sir :) I loved the tutorial! , got an accuracy of 97.72 %
@codebasics
@codebasics 4 жыл бұрын
Great job!
@nitishkeshri2378
@nitishkeshri2378 3 жыл бұрын
how?.....I'm getting only 56%
@bandhammanikanta1664
@bandhammanikanta1664 4 жыл бұрын
Loving your Lectures sir. Could you please use any best deep learning model for this dataset. Or Suggest me one. :)
@ehsanakbari3519
@ehsanakbari3519 Жыл бұрын
that was awesome🤩🤩
@vishnuvardhan-wq5qi
@vishnuvardhan-wq5qi 5 жыл бұрын
my model is 100 percent accurate for iris dataset. thanks for teaching all the topics which are really important in a clean and clear way.
@harshthummar6360
@harshthummar6360 2 жыл бұрын
I loved this tutorial..! Absolutely awesome...!! i get up to efficiency= 96.6%
@codebasics
@codebasics 2 жыл бұрын
That’s the way to go Harsh, good job working on that exercise
@asedaaddai-deseh8152
@asedaaddai-deseh8152 5 жыл бұрын
Thanks so much for these great tutorials! I wish you would upload the continuation of this playlist faster so we can learn fast.
@asedaaddai-deseh8152
@asedaaddai-deseh8152 5 жыл бұрын
@@codebasics Wow, I admire the fact that you're able to make these videos despite your busy schedule. Keep it up!
@anand.prasad502
@anand.prasad502 4 жыл бұрын
@@asedaaddai-deseh8152 medium.com/trainyourbrain/would-you-read-this-article-or-not-b757d0e26cf8
@dhruvkantsharma2955
@dhruvkantsharma2955 4 жыл бұрын
Amazing lecture! I got an accuracy of 93.3%
@vishalrai2859
@vishalrai2859 3 жыл бұрын
i got 88% score
@KushVarma
@KushVarma 4 жыл бұрын
getting a score of 1.0, by using newton-cg solver. Default LogisticRegression() shows warning. You can use model = LogisticRegression(solver = 'newton-cg', multi_class='auto') for better training and accuracy.
@coxixx
@coxixx 4 жыл бұрын
awesome!
@AnanyaRay-ct8nx
@AnanyaRay-ct8nx Жыл бұрын
got 93.33% accuracy. Thank u so much for this playlist..
@ayushshankarpurkar1417
@ayushshankarpurkar1417 Жыл бұрын
i also got 93.33% accuracy can you please tell me how you did it I want to cross check my procedure.
@ss57hd
@ss57hd 5 жыл бұрын
Wow, Your videos are amazing! And i got an accuracy of 96%
@codebasics
@codebasics 5 жыл бұрын
great. thanks for working on exercise and congrats on getting such a high accuracy score. Good job :)
@vinays.m6831
@vinays.m6831 4 жыл бұрын
Sir can u send me that code please... I am not getting that so...
@sujithramanathan3275
@sujithramanathan3275 4 жыл бұрын
@@vinays.m6831 PFB code. Please let me know if anything is incorrect. import pandas as pd import matplotlib.pyplot as plt from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression iris = load_iris() x_train, x_test, y_train, y_test = train_test_split(iris.data, iris.target, test_size=0.2) irisModel = LogisticRegression() irisModel.fit(x_train, y_train) targetIndex = irisModel.predict(x_test) for i in range(len(targetIndex)): print(iris.target_names[targetIndex[i]]) irisModel.score(x_test,y_test)
@mansoorahmed4150
@mansoorahmed4150 3 жыл бұрын
nice explanation. I have one question. What about if we have mix of dependent variables data, like binary as well multiclass v variables, is it fine we apply multiclass regression?
@pamp3657
@pamp3657 Жыл бұрын
Good video.
@wasit-shafi
@wasit-shafi 3 жыл бұрын
At 15:33 I thought you are going to say 'plz plz subscribe the channel, like, comment, share... :) Thank you sir for making such a great videos...
@rajareivan2417
@rajareivan2417 Жыл бұрын
so it can only take inputs and predict images from the dataset?, how if i want to predict other images that are not from the digit dataset?
@josiahvanness4037
@josiahvanness4037 3 жыл бұрын
Sir, you forgot to upload the iris flower Solution for ML exercise 8 in you github, there is only exercise description at the end of github file, no exercise folder, no solution. Your tutorial is awesome, everybody is following you to practice. Thank you for teaching us and can you please upload the solution, appreciated.
@RohitSingh-hc8yi
@RohitSingh-hc8yi 6 ай бұрын
awesome
@yoshidasan4780
@yoshidasan4780 2 жыл бұрын
Thank you so much sir !I am so so grateful to you for these wonderful tutorials ,hope i can learn even more and faster.Btw i got my accuracy as 97.77 !
@pranav9339
@pranav9339 Жыл бұрын
Bro I got the same but is it correct? How can accuracy be so high? Please can you explain
@yoshidasan4780
@yoshidasan4780 Жыл бұрын
@@pranav9339 because the trends are very similar in the test set data too ig and the variance is also low ...that's the reason i think
@mojojojo1854
@mojojojo1854 5 жыл бұрын
please do tutorials on Computer vision using Tensorflow
@cindinishimoto9528
@cindinishimoto9528 4 жыл бұрын
That would be awsome!! ♥️
@shivadumnawar7741
@shivadumnawar7741 4 жыл бұрын
I got 100% accuracy for the iris exercise. Sir give more exercise. These are very helpful, thanks a lot sir
@sejalmittal1326
@sejalmittal1326 4 жыл бұрын
didn't you get total no. of iterations reached ??
@sejalmittal1326
@sejalmittal1326 4 жыл бұрын
Can you help me out ??
@shreyjoshi18
@shreyjoshi18 4 жыл бұрын
increase the size of your test data and then check
@sejalmittal1326
@sejalmittal1326 4 жыл бұрын
@@shreyjoshi18 okay .. thanks
@foreveryour11
@foreveryour11 Жыл бұрын
At 12.17 what we predicted was for X_test. Why did we compare the Y_test and X_predictions? Am i understanding it wrong? 😀
@mlTS7626
@mlTS7626 9 ай бұрын
Superb content, liked this very much 12:50, maybe there's a simple mistake that xlabel should be Truth while ylabel should be Predicted, as we have defined cm in that way
@arjunpukale3310
@arjunpukale3310 5 жыл бұрын
How to recognize whether the classification dataset is linear or non linear if there are multiple variables and cannot be plotted?
@syed1742
@syed1742 4 жыл бұрын
How to visualize decision boundry through plot and how to optimize using log loss function, and whatever you are teaching that teaching everyone.
@sanooosai
@sanooosai 6 ай бұрын
thank you
@vijaydas2962
@vijaydas2962 5 жыл бұрын
In both Binary and Multiclass classification example, you have used the SAME algorithm i.e. from sklearn.linear_model import LogisticRegression model = LogisticRegression() Questions- 1. Does it mean, from LogisticRegression perspective, it makes no difference whether it is binary or multiclass classification? 2. Is there any model parameter that we can tweak to define the class boundary. Say, predict the output as - a) "Excellent", if probability> 0.8 b) "Very Good", if probability >0.6 and 0.4 and 0.2 and
@g00dvibes47
@g00dvibes47 4 жыл бұрын
It’s very late and I’m very tired, but in a nutshell, sometimes you can use regression as a classifier and sometimes binary classifiers are suitable for multiclass classifications!
@tanmaythaker2905
@tanmaythaker2905 2 жыл бұрын
Sir done with the assignment. Got 100% train accuracy for iris dataset and also plotted the confusion matrix.
@perikalasunny5698
@perikalasunny5698 Ай бұрын
sir in this video i think you took x and y axis reverse in labelling the cause in confusion matrix arguments its x and y respectively right?
@cindinishimoto9528
@cindinishimoto9528 4 жыл бұрын
Awesome exercise! I got an accuracy of 97, 77%
@aditinagar6688
@aditinagar6688 4 жыл бұрын
Can you please provide the solution link as it is not there on github? It would be helpful.
@cindinishimoto9528
@cindinishimoto9528 4 жыл бұрын
Hi, @@aditinagar6688​. Please see below: iris = load_iris() print(dir(iris)) df = pd.DataFrame(iris.data, columns=iris.feature_names) print(df.head()) df["target"] = iris.target print(df.head()) df["target"].replace({0: "setosa", 1: "versicolor", 2: "virginica"}, inplace=True) print(df.head(-10)) x = df.drop(["target"], axis=1) y = df["target"] from sklearn.model_selection import train_test_split x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.3) print(len(x_train)) print(len(x_test)) from sklearn.linear_model import LogisticRegression model = LogisticRegression() model.fit(x_train, y_train) print(model.score(x_test, y_test)) print(model.predict(x_test)) #print(y_test) print(model.predict([[4.9, 3.0, 1.4, 0.2]])) #setosa y_predicted = model.predict(x_test) from sklearn.metrics import confusion_matrix cm = confusion_matrix(y_test, y_predicted) print(cm) import seaborn as sn plt.figure(figsize=(10, 7)) sn.heatmap(cm, annot=True) plt.xlabel("Predicted") plt.ylabel("Truth") plt.show()
@tejobhiru1092
@tejobhiru1092 3 жыл бұрын
@@cindinishimoto9528 thank you so much..! this helps a lot.. i was not able to figure out how to handle that dataset!
@cindinishimoto9528
@cindinishimoto9528 3 жыл бұрын
@@tejobhiru1092 ^_^
@haiderkhwaja2514
@haiderkhwaja2514 10 ай бұрын
@@cindinishimoto9528 i also need this exercise code very badly
@hameedali2963
@hameedali2963 4 жыл бұрын
great
@nilupulperera
@nilupulperera 4 жыл бұрын
Dear Sir Very interesting exercise. Model accuracy varies from 0.8 to 1.0, each and every time after a fresh run of the full code (as you explained). The average accuracy is around 9.66667. Thank you very much
@pranavkushare5109
@pranavkushare5109 4 жыл бұрын
use (shuffle=False) in train_test_split()
@parasf09
@parasf09 4 жыл бұрын
accuracy=93.3% thankyou sir
@87prak
@87prak Жыл бұрын
You should have talked about what scikit logistic regression is doing under the hood for multiclass. The tutorial does not touch on that and simply runs the program as if it were binary class problem. Is it using n binary classifiers or a softmax, that is what should have been discussed here.
@muhammedrajab2301
@muhammedrajab2301 3 жыл бұрын
sir I have done the Iris flower exercise according to what I have learnt from you. I got an accuracy of 1.0 (I thing it is 100%) ! I just done everything according to what I have learnt from you!
@codebasics
@codebasics 3 жыл бұрын
Perfect and keep it up. The dataset is small hence getting accuracy of 1 is not unusual
@vedanthbaliga7686
@vedanthbaliga7686 3 жыл бұрын
if you have given random_state or shuffle=True then the accuracy will be 1
@oilidzaghloul3266
@oilidzaghloul3266 3 жыл бұрын
@@vedanthbaliga7686 even without a random_state or shuffle it s still possible to get 1, it s all due to the fact that our dataset here is small
@leooel4650
@leooel4650 5 жыл бұрын
Can't express how grateful i am to you Sir. I am very willing to even pay for your stuff and help you somehow. Thanks once again, my accuracy was about 92%
@zerostudy7508
@zerostudy7508 5 жыл бұрын
how much ratio test/train u use? i got 91...%
@leooel4650
@leooel4650 5 жыл бұрын
@@zerostudy7508 20% of the data to be tested. But the accuracy depends as we are getting random data to be trained or tested. My opinion is that your model is correct, we just have different trained data.
@zerostudy7508
@zerostudy7508 5 жыл бұрын
@@leooel4650 Thank you so much buddy, i just checked that if i use 90% data for train and 10% data test i get 88-90% acuracy, but when i use 80% the data for training i got everage more than 90-100% accuracy. i'll tell you when i figured something out....
@leooel4650
@leooel4650 5 жыл бұрын
@@zerostudy7508 happy to help as I am still figuring things out.
@zerostudy7508
@zerostudy7508 5 жыл бұрын
@@leooel4650 i got it it something to do with sample and population' if test A=20 and test A=10 then they both got just 1 wrong answer A and B Standard Deviation Sample are A=0.217944947 B=0.316227766 about 10% difference in a nutshell its sound like this: your teacher give 10 questions for exam and your friend got 100, if both of you had 1 wrong answered in the exam, which of you have the highest test score ? have a nice day
@swL1941
@swL1941 4 жыл бұрын
100% accuracy. Thank You Sir.
@cbbakshi2020
@cbbakshi2020 5 жыл бұрын
Amazing tutorial:) How to make roc_curve for this multiclass problem?
@AlonAvramson
@AlonAvramson 3 жыл бұрын
Thank you for explaining this in such a nice and easy way. BTW, I downloaded the whole GIT files but could not find the exercise solution for this session, so If some one has a clue please let me know.
@aravinthm8328
@aravinthm8328 3 жыл бұрын
Yaa the answer for this exercise is not in the file. I solved the exercise, you can also try in the same way as in the model problem. but in the Handwritten digit problem, i got an error when fitting the model :( , i cant correct the error. It showing 'str' object has no attribute 'decode'. Can you help me to come out from this.
@RahulRaj-cy1xb
@RahulRaj-cy1xb 2 жыл бұрын
Bro we need to download exercise from kaggle? As sir only uploaded image on github
@kalaipradeep2753
@kalaipradeep2753 10 ай бұрын
I got 100% accuracy🎉🤩
@asitkmr487
@asitkmr487 5 жыл бұрын
Very informative. As per my understanding LR model predicts the binary classification problem. It would be great if you can share how this predicts this multi class problem?
@codebasics
@codebasics 5 жыл бұрын
Check machine learning tutorial playlist on my channel. I have example for binary classification as well and in fact this particular tutorial is for multiclass classification
@thannasip8001
@thannasip8001 3 жыл бұрын
Hi ,as you said sigmoid function will convert values to 0 or 1 ,how is it possible to predict digits with this concept ?,for binary output I got it but for digits it confused me
@ansh6848
@ansh6848 2 жыл бұрын
I have set max_iter to 1,00,000 and achieved acurracy of 100%
@anandsingh1011
@anandsingh1011 5 жыл бұрын
Your all video on any topic have deep theoretical explained with notebook , Can you suggest good resource or book for Machine Learning ?
@orangewares
@orangewares 5 жыл бұрын
kzbin.info/www/bejne/hXjbmKF-bd5lhK8
@naveenkalhan95
@naveenkalhan95 4 жыл бұрын
@12:47 maybe not that important.. but just for my clarification, I would like to confirm... should plt.xlabel not be 'Truth' and plt.ylabel be 'Predicted' ? Thank you for your hard work.
@himanshugarg7113
@himanshugarg7113 4 жыл бұрын
Yes, it is. It has produced merely transpose.
@snehagupta-xz1fs
@snehagupta-xz1fs 3 жыл бұрын
even I've the same doubt
@jaiprathapgv2273
@jaiprathapgv2273 3 жыл бұрын
How can use this model used to recognize a new target image out of digits library?how to view the classification graph?
@musthakhahammed6535
@musthakhahammed6535 2 жыл бұрын
I got 100% accuracy with 20% test size 😍😍😍 A big salute to this teacher
Machine Learning Tutorial Python - 9  Decision Tree
14:46
codebasics
Рет қаралды 511 М.
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 7 МЛН
Я обещал подарить ему самокат!
01:00
Vlad Samokatchik
Рет қаралды 9 МЛН
Machine Learning Tutorial Python - 10  Support Vector Machine (SVM)
23:22
Logistic Regression - THE MATH YOU SHOULD KNOW!
9:14
CodeEmporium
Рет қаралды 147 М.
Machine Learning Tutorial Python 12 - K Fold Cross Validation
25:20
Water powered timers hidden in public restrooms
13:12
Steve Mould
Рет қаралды 698 М.
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 7 МЛН