Video outline! 0:20 - What we will be doing! 3:40 - Sci-Kit Learn Overview 6:38 - How do we find training data? 9:33 - Download data 11:45 - Load our data into Jupyter Notebook 16:38 - Cleaning our code a bit (building data class) 20:13 - Using Enums 22:50 - Converting text to numerical vectors, bag of words (BOW) explanation 25:45 - Training/Test Split (make sure to "pip install sklearn" !) 33:45 - Bag of words in sklearn (CountVectorizer) 40:05 - fit_transform, fit, transform methods 42:05 - Model Selection (SVM, Decision Tree, Naive Bayes, Logistic Regression) & Classification 47:50 - predict method 53:35 - Analysis & Evaluation (using clf.score() method) 56:58 - F1 score 1:01:01 - Improving our model (evenly distributing positive & negative examples and loading in more data) 1:20:36 - Let's see our model in action! (qualitative testing) 1:22:24 - Tfidf Vectorizer 1:25:40 - GridSearchCv to automatically find the best parameters 1:31:30 - Further NLP improvement opportunities 1:32:50 - Saving our model (Pickle) and reloading it later 1:36:37 - Category Classifier 1:39:14 - Confusion Matrix Thank you for watching! Make sure to like & subscribe if you enjoyed :)
@shagufta3247
5 жыл бұрын
thanks so much please make videos on Django python full tutorial using visual studio
@girishvenkatachalam8793
4 жыл бұрын
Thanks man
@mimididi8689
4 жыл бұрын
Is there anyway I could import another random dataset into my trained model and see if he can predict me the category from the other database (the one I used to trained my model)
@joneandrewharris8225
4 жыл бұрын
can you help out with my error in the comments
@alexvidu4517
3 жыл бұрын
This is glorious, been searching for "learn tennis betting game" for a while now, and I think this has helped. Ever heard of - Aiyenjamin Prefatory Approach - (should be on google have a look ) ? It is a good one of a kind guide for discovering how to get a unique tennis betting formula minus the hard work. Ive heard some super things about it and my buddy got amazing results with it.
@ManishSharma-xq9be
5 жыл бұрын
He not only teaches the good stuff but also teach how to google things and get the job done. Keep going brother!. You are Awesome.
@KeithGalli
5 жыл бұрын
My goal is for you guys to be able to do this type of stuff on your own! Thanks for the support man, I appreciate it :)
@shuhratjonzikiryaev9685
3 жыл бұрын
Yes, I agree with you 100%. He is the only person I know on youtube that actually teaches the material so well! I hope to see this channel grow to millions of subscribers.
@niteshprajapat7918
3 жыл бұрын
yess exactly.... I was confused how to use stackoverflow...but after watching his real world problem tutorial.. I learnt this skill too
@mucahitugurlu7324
4 жыл бұрын
you're the reason that I've got an internship in a great company :) well.. I'm broke now :D but when I earn tons of money( I hope we all do :D ) I'll donate you Keith !
@xyphoes345
2 жыл бұрын
How are you doing now, man? Any updates?
@joelrichmond6256
2 жыл бұрын
Hey man how you doing now
@KeithGalli
2 жыл бұрын
Doing well now finally! :). Will be back on youtube very soon
@uchechukwumazi6512
2 жыл бұрын
A quick one for those into machine learning. On a scale of 1-10 how sufficiently enough does this tutorial cover machine learning. I am developing certain skills in data analytics and wanted to add Machine learning into the mix but don’t want to start diving too much into it. Just the necessary I will be need for a day in day out machine learning job requirements
@uchechukwumazi6512
2 жыл бұрын
A quick one for those into machine learning. On a scale of 1-10 how sufficiently enough does this tutorial cover machine learning. I am developing certain skills in data analytics and wanted to add Machine learning into the mix but don’t want to start diving too much into it. Just the necessary I will be need for a day in day out machine learning job requirements
@jenn6997
4 жыл бұрын
I like it when you showed us how you would use online resources, all the Googling and documentation stuff, so that we are not afraid to actually go online ourselves and explore more new functions :) Thanks Keith!! Stay healthy! :)
@BennyHarassi
5 жыл бұрын
Please keep uploading you're one of the best tutorial channels.
@KeithGalli
5 жыл бұрын
Thank you!! Will do my best
@deufrai1
Жыл бұрын
50 y.o. software developer here. this is the first hands on video I watch on the subject of ML. As a first step into the subject, I'm very sarisfied with the time I spent with you. You covered the basics, from data prep to model save and load. Surely a good starting point for further personal explorations. Also enjoying your Pandas related content Keep up the good work, and maybe use Jupyter's tab-completion, sometimes ;)
@sunritjana4573
3 жыл бұрын
I have been doing a lot of courses for ML in scikit, I found this last week, and learnt it. And to be honest, I mastered things, which they couldn't cover in the so-called "mega" courses. You're awesome and also really helpful!
@rawmetal3052
3 жыл бұрын
This guy is like the human version of W3school, his content is simple, succinct and well thought out
@saptarshisanyal4869
2 жыл бұрын
This one is just one heck of tutorial. Thanks a ton Keith. I am a Java Architect with 17 years of extensive experience, looking to shift to ML/Data Science. It took me 3 hours to cover this video. I must say first one hour was realy easy to follow but probably you covered a lot of things in the last 40 minutes.
@FraserMyersMusic
5 жыл бұрын
I was waiting for this! You sir, are a legend
@stickmanjournal
2 жыл бұрын
@wise guy I think discrete math would help you grasp this
@imadudin2489
11 күн бұрын
Big thank for you, Keith...!!! May be just requesting for pytorch tutorial.
@kushsheth4801
2 жыл бұрын
that moment of joy when i saw my model work! its like magic too good
@AmandeepSingh-cv5qz
2 жыл бұрын
keith ,you are like an elder brother teaching us how to do sums.thanksssssssssssssssssssssssssss a lottttttttttttttttttttttttttt bruhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
@Max-my6rk
4 жыл бұрын
i always am being directed back and stay at Keith's video... just awesome...
@hollmanbaez1423
4 жыл бұрын
You are so good, explaining the hardest things in common language and makes it easy to understand to even my grandma.... Thanks so much for making this simple!
@kryskoss8410
4 жыл бұрын
I learned more in these 2 hours than my professor taught in 2 weeks. Many thanks!
@dhruvmk3055
4 жыл бұрын
Great video, but I tested a few other algorithms on the data-set and they seemed to work even better on the data. The algorithms were: Nearest Centroid Classifier and Stochastic Gradient Descent. Thanks for the video though, really helped me.
@dikshyantthapa3367
3 жыл бұрын
You kept appearing on my thumbnail.. I didn't care at first.. Later for once i opened the data science video.. Man.. It was so useful. The application videos of machine learning, data science were awesome. Thanks Keith ❤️.
@KeithGalli
3 жыл бұрын
Well I'm happy that you ended up clicking on a video :). Also glad that you have found the videos useful. I appreciate the support!
@lokeshnagarajan7495
4 жыл бұрын
Amazing video. One won't find such tutorial on Python and Machine learning modules. It's the very video helped to complete my project.
@KeithGalli
4 жыл бұрын
Glad you liked it!
@mohitkishore8494
3 жыл бұрын
This is by far the most useful tutorial that I have ever seen. You are an amazing teacher.
@haraldlons
4 жыл бұрын
Just watched the video in one sitting. It was great! I learned so much, and I loved you showed the entire process from data to evaluation of model. Keep up the good work :)
@KeithGalli
4 жыл бұрын
Thank you! Glad it was helpful :)
@quickpresent8987
3 жыл бұрын
I only have a basic knowledge about python and c# language, thanks for teach me a machine learning method !!! . Continue upload these kind of video pls , you are the best teaching channel
@MrTaken-tl4bw
3 жыл бұрын
In the first exercise if any of you feels like laughing a bit do this: if float(review['overall']) < 2: print(review['reviewText']+ ' ') Also, great video! Didn't know I could enjoy Data Science as much as I am.
@nabilelbilali9569
4 жыл бұрын
I think this way it's much clear in the Prep Data x=[t.text for t in reviews] y=[z.sentiment for z in reviews] x_train,y_train,x_teat,y_test=train_test_split(x,y,test_size=0.3)
@jenn6997
4 жыл бұрын
Phew, finally finished watching this one:) A lot to take in, but super helpful and interesting! Thanks, Keith! :) Gonna start your real-world task with Pandas tomorrow!
@utkarshkapil
2 ай бұрын
Relevant and super helpful in 2024 too !
@gisleberge4363
11 ай бұрын
Real helpful, made me realise New possibilities on how to go agout text data - thanks 🙂
@vijaykumar-od7kx
4 ай бұрын
Excellent tutorial to learn the fundamentals of SCI-Kit
@RobinHagg
2 жыл бұрын
Yes. Been starting out with scikit and all videos are just so so. But your videos are always great
@alexq5516
4 жыл бұрын
This video is super helpful! I have struggled in making my model using sklearning for several days and you just make my day! Thanks!
@bboyhusky
2 жыл бұрын
Great tutorials ! Sentiment.POSITIVE Jupyter-Tip: press esc + numbers 1,2,3 or 4 to create markdown header cells
@saikumargatla4706
Жыл бұрын
Your videos. Are changing my life
@gannoncondon1864
2 жыл бұрын
Another great video. Really appreciate minimal slides paired with the 'live' coding feel.
@melihsafacelik1166
4 жыл бұрын
I am like machines. I am always learning... Not watched but I believe you made your best.
@melihsafacelik1166
4 жыл бұрын
Edit: I just finished this tutorial and I still support my first comment. NOICE. You are real deal!
@aligh18
4 жыл бұрын
Wow Keith, you're an absolute legend! I can't wait to get through your other videos and see your future work :D
@hsrayyar
3 жыл бұрын
You look so young, but your ability is so good.Thanks for your explanation
@sarowarshouvo
2 жыл бұрын
Hey keith,through this video just completed the first machine learning project.Thanks:).
@KeithGalli
2 жыл бұрын
Nice work! Your first of many to come 🤠
@somshridhar
3 жыл бұрын
Really appreciate your efforts. I did not understand from my class teacher anything. Keith taught it very nicely. Thanks a lot
@Locke19901
4 жыл бұрын
Keith, this is incredibly helpful. Your teaching style is to be commended. I look forward to more like this for ML.
@merkol8
3 жыл бұрын
I have implemented my first ml model with the help of you please upload more content you are amazing well done !
@BarryOGorman
3 ай бұрын
Great intro - and commitment to good programming
@johnhutchinson9445
3 жыл бұрын
Thank you for this video! This saved me so much time digging through documentation to try to understand how to implement these libraries!
@sudhakar6933
3 жыл бұрын
finally, found another one who's lessons are understandable
@safizaidi2787
4 жыл бұрын
Keith man. This is an awsome video. Please make some more videos just like you did "Solving real world data science task" video.
@asafrozali1353
3 жыл бұрын
thanks man , i'm watching your whole data science video series and you are awesome!
@azrulfyz1162
4 жыл бұрын
Wow, that is one comprehensive tutorial. Thanks for the time and effort.
@prashlovessamosa
Жыл бұрын
Your channel is heaven to me.
@DataversePH
4 жыл бұрын
This video is so underrated. Should have atleast 500K views.
@ninjaduck3534
3 жыл бұрын
Dude you are an excellent educator, thank you so much for this well structured, well explained video!!
@drglover31
4 жыл бұрын
KG Intelligence I appreciate your detailed videos on this platform
@briannnnnnnnnn1037
4 жыл бұрын
This is great! Looking forward to more ML content like regression, decision trees, SVM.
@hiukecil
4 жыл бұрын
Hi keith, what a great video. I think i know why the result of SVC is still the same. Because the best parameters are c=1 and kernel= linear, not rbf. You can check the best parameter of the gridsearchcv by running clf.best_params_
@jamesriri1810
4 жыл бұрын
@Keith Galli this is really dope. Totally love how how you teach the tutorial. Amazing stuff here.
@overgeared
4 жыл бұрын
practical and nicely done. thanks! please do more videos on sklearn, maybe regression & clustering...
@barbaracosta4183
4 жыл бұрын
Thanks for the cool tutorial! Just a quick correction: when you're classifying using Naive Bayes, you used the Decision Tree Classifier, copied from the previous case. It's not super critical, but when I tried to use what I believed to be the corrected version, I found an unexpected error, and to use a working Naive Bayes, had to convert the train vector to a dense matrix using ".todense()". I'm not sure if this is correct though, if you have any input on this, it would be greatly appreciated! Thanks again :) How I tried to do it: clf_gnb = GaussianNB() clf_gnb.fit(train_x_vectors.todense(), train_y) clf_gnb.predict(test_x_vectors[0].todense())
@WhiteError37
4 жыл бұрын
thanks dude
@choutos404
4 жыл бұрын
Not working for me, I used .toarray() instead.
@extremelyfunnyvideos9052
4 жыл бұрын
I also had a problem with this. Where should we insert the fix? this : clf_gnb.predict(test_x_vectors[0].todense()) .. seems to late Anyone manage to get it working? Thanks
@SasanMaleki
4 жыл бұрын
Thank you!
@timmdunker8507
4 жыл бұрын
Thanks! :)
@celina6204
4 жыл бұрын
Loved this video! I followed along writing my own code and it helped me put what I've learned into practice. Thank you so much for the practical advice, I can't wait to start on my own projects. Liked and subscribed! :) p.s. Did anyone have issues getting the output from the GridSearch portion? That was the only part that messed up for me. My output: GridSearchCV(cv=5, estimator=SVC(), param_grid={'C': (1, 4, 8, 16, 32), 'kernel': ('linear', 'rbf')})
@adarshparihar3300
2 жыл бұрын
I was also having this problem, there was no result from GridSearchCV, hope you have got the solution for it.
@uchechukwumazi6512
2 жыл бұрын
Hello. Good day. A quick one for those into machine learning. On a scale of 1-10 how sufficiently enough does this tutorial cover machine learning. I am developing certain skills in data analytics and wanted to add Machine learning into the mix but don’t want to start diving too much into it. Just the necessary I will be need for a day in day out machine learning job requirements
@khalifaothman3963
4 жыл бұрын
from sklearn.naive_bayes import GaussianNB clf_gnb = GaussianNB() clf_gnb.fit(train_x_vectors, train_y) clf_gnb.predict(test_x_vectors[0]) what is the fault TypeError: A sparse matrix was passed, but dense data is required. Use X.toarray() to convert to a dense numpy array.
@WeAreSWAGent
4 жыл бұрын
having the same issue
@WeAreSWAGent
4 жыл бұрын
fixed it. clf_nb.fit(train_x_vectors.todense(),train_y) clf_nb.predict(test_x_vectors.todense()[0])
@neila.9195
4 жыл бұрын
@@WeAreSWAGent Thanks!
@amankumarsingh6242
4 жыл бұрын
Your videos are superb. I can see your videos and just get started applying it to my project. Thank you👍.
@KeithGalli
4 жыл бұрын
That's awesome! Glad you have enjoyed :)
@Kris-to7vh
3 жыл бұрын
Best channel ever to learn any Python library! 1:05 i wonder what the outcome will be for sarcasm, something like: 'beautiful restaurant that made me puke, raccomand'
@vilasjagtap6165
4 жыл бұрын
Great stuff Keith. Really good. Keep doing your bit for all of us. Thanks a lot.
@hectordavila6249
4 жыл бұрын
Thank yoy man, you are awesome, I really appreciate your videos and how you go trough all the process step by step. Please keep uploading.
@resh8198
4 жыл бұрын
Hello if your Gaussian naive Bayes keeps coming up with an error, try this: from sklearn.naive_bayes import GaussianNB clf_gnb = GaussianNB() clf_gnb.fit(train_x_vectors.todense(), train_y) clf_gnb.predict(test_x_vectors[0].todense())
@rishabhsharma2190
4 жыл бұрын
Resh Thank you for the solution
@tak68tak
4 жыл бұрын
Sooo POSITIVE. You really saved me. Thanks a lot!
@tedgq
5 жыл бұрын
Letss goo! Didn't know I wanted this video until it was here
@KeithGalli
5 жыл бұрын
Love to hear it!!
@BM-vz2nb
4 жыл бұрын
Very good and cool Tutorial Keith! Thanks a Ton! Loved it!
@lisaw3829
4 жыл бұрын
Watching the tutorial is kind of enjoyment! Have subscribed and waiting for more videos.
@KeithGalli
4 жыл бұрын
Glad to hear it! Thanks for the sub! :)
@liam4154
2 жыл бұрын
Great video man! some of the best quality educating on youtube!
@haigangzhang8039
2 жыл бұрын
Thanks a lot for the great video, I spent a few days to follow through, and learn a lot!
@maksimparnyakov6802
4 жыл бұрын
Thank you very much for proper explanation. It’s got clear after your video
@keihinata3740
3 жыл бұрын
Thanks, Keith! I really like how you teach these stuff. Easy to understand and covers all necessary topics. Excellent tutorial. This comment might be considered a 'POSITIVE' sentiment in the model. 😆
@constantineveres3731
4 жыл бұрын
Hey Keith. Looks like the issue with relatively low score (~80%) is caused by imperfection of training data. I'm talking about conversion of Star rate to one of three classifiers: NEGATIVE, POSITIVE, NEUTRAL. The problem is that Stars are assigned by Customers but not Amazon AI Engine. People are treating say 3 star rate in very different way. Even if Customer is not really happy with product and giving fairly negative feedback, he/she still can provide 3 stars rate. So, while 5-4 stars rate is working well for POSITIVE as well as 2-1 stars - for NEGATIVE, there is a little bit uncertainty with 3 Stars rate. I think (5-4-3 stars for POSITIVE and 2-1 stars for NEGATIVE) or (5 stars for PERFECT, 4-3 for POSITIVE and 2-1 NEGATIVE) logic should give us 90-95% score. Thoughts?
@KeithGalli
4 жыл бұрын
Yeah you're very right with your thoughts. The meaning of the 3-star classification is pretty ambiguous and we can't reliably count on the data rated this way. Ultimately though the models that were being scored with ~80% were only classifying between NEGATIVE (1-2 star) & POSITIVE (4-5 star) so our model had more issues than just how we categorized the data. If we want to get that score up higher we will want to apply some additional processing to our text. Some ideas would be removing stop words (words like "the", "this", "that", etc), lemmatizing/stemming (converting words to a base form), and utilizing bigrams (pairs of words instead of single words). Another reason for a relatively low score is that our data is not perfect. Even some of the 5 star reviews probably have no meaningful information that conveys positive sentiment in their review text. Same goes for 1 star reviews. Potentially doing some manual review of our training data would be another way to improve the score. Hope this information is helpful! BTW, I'm a huge hockey fan and after noticing the hat in your profile picture I have to quickly say.... Go Bruins!!! ;)
@robingeorge7217
5 жыл бұрын
Please upload a real world predictive model project
@alexanderscott2456
4 жыл бұрын
43:00 He's referring to Patrick Winston. By sheer chance I was watching one of his lectures on YT early this morning.
@Max-my6rk
4 жыл бұрын
Keith Galli: "I'm going insane!" ahahah
@adventurerwannabe
4 жыл бұрын
that made me chuckle too lol
@maherelouahabi6440
5 жыл бұрын
Could you make a short video explaining what are the differences between deep learning, machine learning and AI from your point of view. Thank you and good luck
@andyn6053
4 жыл бұрын
learn to google man
@azrmuradl6420
2 жыл бұрын
amazing! expecting more projects like this
@gregmaland5318
3 жыл бұрын
Thank you! This was extremely helpful. (POSITIVE)
@ssharkwsk9439
4 жыл бұрын
Great videos and series Keith, Kudos to you. Keep it going....
@atharvapatil7549
4 жыл бұрын
This was really helpful, I have been watching your videos since last few days. They are really aweseome. Subscribed. Can you please make a video for Face recognition using CNN or suggest me a link to watch.
@bhoomimukadam8221
4 жыл бұрын
@keithgalli even I want to learn face recognition using cnn plz make a video for that
@vedantvraj
4 жыл бұрын
Yes Please make a video on Face Recognition.
@carlosjacobfield-sierra3759
5 жыл бұрын
This video was great man, keep it up your going places.
@hemanthshankar4520
3 жыл бұрын
i really like the way u explain
@sandeepsharma-ph8id
Жыл бұрын
Awesome learning material. Thanks for making it.
@lfmtube
3 жыл бұрын
Very good video! New subscriber and added to my “ Perfect videos” list. Thanks for sharing your knowledge.
@richarddoggies3038
3 жыл бұрын
It's a positive comment on your video about how it's cool. Thank you
@piotrb5161
5 жыл бұрын
It's a good and hard work for... for us! Thank you Keith!
@KeithGalli
5 жыл бұрын
You're very welcome! Challenging yourself is the best way to learn :)
@leasrhythm473
3 жыл бұрын
very nice video, so well explained for beginners! Thank you so much!
@DJSEWWES
2 жыл бұрын
big fan of what you are doing keep it up (y)
@happylearning-gp
4 жыл бұрын
Excellent Tutorial Keith, Thank you very much
@KeithGalli
4 жыл бұрын
Glad you enjoyed! You are very welcome :)
@sreevlogger3847
3 жыл бұрын
Really nice and easy to understand
@shoaibsh2872
4 жыл бұрын
It was a really good video. But I have this one question. Why didn't we change the sentiment into numbers (i.e: "NEGATIVE=0, POSITIVE=1) and then try to fit the model. How does the model can understand the string values?
@tobiasksr23
4 жыл бұрын
Awesome. Are you planning making more of this Machine Learning Videos? It would be great if you could include more about the preprocessing part, maybe trying to get data from a source where it is not ordered and with lot of outliers.
@michaelpritchard2350
Жыл бұрын
Keith has got it DOWN! Very instructive, thank you.
@mahmoudaldeeb452
4 жыл бұрын
keep going man ,you are the best
@bosorensen
2 жыл бұрын
Wonderfully done! Thank you!
@jongcheulkim7284
3 жыл бұрын
Thank you so much. it was awesome!!
@kihunkim7498
5 жыл бұрын
i miss your tutorial . good job !!!
@KeithGalli
5 жыл бұрын
Thank you!!
@JMatthews
Жыл бұрын
phew.. that was heavy, not sure if you were rushing in with a lot of things, but then maybe there's so much to cover there anyways. You did well in spite of all anyways, but yeah there's a lot to pick up from this video.. good work
@chuanjiang6931
4 жыл бұрын
Improving accuracy by balancing test data does not mean your model is robust enough. I expected your model would have worked well even for unbalanced test data. Do you have any suggestions on how to do that?
@gianniprocida3332
2 жыл бұрын
Thanks for the excellent tutorial!!
@datastako156
3 жыл бұрын
Great tutorials! a learned alot from you more powers!
Пікірлер: 314