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 :)
@shagufta32475 жыл бұрын
thanks so much please make videos on Django python full tutorial using visual studio
@girishvenkatachalam87935 жыл бұрын
Thanks man
@mimididi86894 жыл бұрын
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)
@joneandrewharris82254 жыл бұрын
can you help out with my error in the comments
@alexvidu45174 жыл бұрын
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-xq9be5 жыл бұрын
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.
@KeithGalli5 жыл бұрын
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 :)
@shuhratjonzikiryaev96854 жыл бұрын
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.
@niteshprajapat79183 жыл бұрын
yess exactly.... I was confused how to use stackoverflow...but after watching his real world problem tutorial.. I learnt this skill too
@BennyHarassi5 жыл бұрын
Please keep uploading you're one of the best tutorial channels.
@KeithGalli5 жыл бұрын
Thank you!! Will do my best
@mucahitugurlu73244 жыл бұрын
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 !
@xyphoes3453 жыл бұрын
How are you doing now, man? Any updates?
@joelrichmond62563 жыл бұрын
Hey man how you doing now
@KeithGalli3 жыл бұрын
Doing well now finally! :). Will be back on youtube very soon
@uchechukwumazi65122 жыл бұрын
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
@uchechukwumazi65122 жыл бұрын
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
@jenn69974 жыл бұрын
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! :)
@daniromsey187Ай бұрын
I think this is the best one I've seen, got me started and also you showed how a real project might look, googling things and reviewing errors, thank you!
@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 ;)
@sunritjana45734 жыл бұрын
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!
@rawmetal30523 жыл бұрын
This guy is like the human version of W3school, his content is simple, succinct and well thought out
@saptarshisanyal48693 жыл бұрын
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.
@FraserMyersMusic5 жыл бұрын
I was waiting for this! You sir, are a legend
@stickmanjournal3 жыл бұрын
@wise guy I think discrete math would help you grasp this
@Max-my6rk4 жыл бұрын
i always am being directed back and stay at Keith's video... just awesome...
@lokeshnagarajan74954 жыл бұрын
Amazing video. One won't find such tutorial on Python and Machine learning modules. It's the very video helped to complete my project.
@KeithGalli4 жыл бұрын
Glad you liked it!
@hollmanbaez14234 жыл бұрын
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!
@dikshyantthapa33674 жыл бұрын
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 ❤️.
@KeithGalli4 жыл бұрын
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!
@kushsheth48013 жыл бұрын
that moment of joy when i saw my model work! its like magic too good
@mohitkishore84944 жыл бұрын
This is by far the most useful tutorial that I have ever seen. You are an amazing teacher.
@quickpresent89874 жыл бұрын
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-tl4bw3 жыл бұрын
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.
@haraldlons4 жыл бұрын
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 :)
@KeithGalli4 жыл бұрын
Thank you! Glad it was helpful :)
@kryskoss84104 жыл бұрын
I learned more in these 2 hours than my professor taught in 2 weeks. Many thanks!
@sarowarshouvo2 жыл бұрын
Hey keith,through this video just completed the first machine learning project.Thanks:).
@KeithGalli2 жыл бұрын
Nice work! Your first of many to come 🤠
@RobinHagg3 жыл бұрын
Yes. Been starting out with scikit and all videos are just so so. But your videos are always great
@jenn69974 жыл бұрын
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!
@AmandeepSingh-cv5qz3 жыл бұрын
keith ,you are like an elder brother teaching us how to do sums.thanksssssssssssssssssssssssssss a lottttttttttttttttttttttttttt bruhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
@alexq55164 жыл бұрын
This video is super helpful! I have struggled in making my model using sklearning for several days and you just make my day! Thanks!
@imadudin15224 ай бұрын
Big thank for you, Keith...!!! May be just requesting for pytorch tutorial.
@aligh184 жыл бұрын
Wow Keith, you're an absolute legend! I can't wait to get through your other videos and see your future work :D
@Kris-to7vh3 жыл бұрын
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'
@asafrozali13534 жыл бұрын
thanks man , i'm watching your whole data science video series and you are awesome!
@gannoncondon18642 жыл бұрын
Another great video. Really appreciate minimal slides paired with the 'live' coding feel.
@somshridhar3 жыл бұрын
Really appreciate your efforts. I did not understand from my class teacher anything. Keith taught it very nicely. Thanks a lot
@Locke199014 жыл бұрын
Keith, this is incredibly helpful. Your teaching style is to be commended. I look forward to more like this for ML.
@saikumargatla4706 Жыл бұрын
Your videos. Are changing my life
@merkol83 жыл бұрын
I have implemented my first ml model with the help of you please upload more content you are amazing well done !
@sudhakar69333 жыл бұрын
finally, found another one who's lessons are understandable
@vijaykumar-od7kx8 ай бұрын
Excellent tutorial to learn the fundamentals of SCI-Kit
@gisleberge4363 Жыл бұрын
Real helpful, made me realise New possibilities on how to go agout text data - thanks 🙂
@msc-clk4 жыл бұрын
I am like machines. I am always learning... Not watched but I believe you made your best.
@msc-clk4 жыл бұрын
Edit: I just finished this tutorial and I still support my first comment. NOICE. You are real deal!
@hsrayyar4 жыл бұрын
You look so young, but your ability is so good.Thanks for your explanation
@BarryOGorman7 ай бұрын
Great intro - and commitment to good programming
@prashlovessamosa Жыл бұрын
Your channel is heaven to me.
@bboyhusky3 жыл бұрын
Great tutorials ! Sentiment.POSITIVE Jupyter-Tip: press esc + numbers 1,2,3 or 4 to create markdown header cells
@azrulfyz11624 жыл бұрын
Wow, that is one comprehensive tutorial. Thanks for the time and effort.
@DataversePH4 жыл бұрын
This video is so underrated. Should have atleast 500K views.
@yongsuhuang61953 жыл бұрын
Almost exact 2 years later, a crappy student is watching ur video at 3am, trying to finish his assignment
@safizaidi27874 жыл бұрын
Keith man. This is an awsome video. Please make some more videos just like you did "Solving real world data science task" video.
@liam41542 жыл бұрын
Great video man! some of the best quality educating on youtube!
@dhruvmk30554 жыл бұрын
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.
@johnhutchinson94453 жыл бұрын
Thank you for this video! This saved me so much time digging through documentation to try to understand how to implement these libraries!
@tedgq5 жыл бұрын
Letss goo! Didn't know I wanted this video until it was here
@KeithGalli5 жыл бұрын
Love to hear it!!
@drglover314 жыл бұрын
KG Intelligence I appreciate your detailed videos on this platform
@briannnnnnnnnn10374 жыл бұрын
This is great! Looking forward to more ML content like regression, decision trees, SVM.
@ninjaduck35343 жыл бұрын
Dude you are an excellent educator, thank you so much for this well structured, well explained video!!
@lisaw38294 жыл бұрын
Watching the tutorial is kind of enjoyment! Have subscribed and waiting for more videos.
@KeithGalli4 жыл бұрын
Glad to hear it! Thanks for the sub! :)
@vilasjagtap61654 жыл бұрын
Great stuff Keith. Really good. Keep doing your bit for all of us. Thanks a lot.
@jamesriri18104 жыл бұрын
@Keith Galli this is really dope. Totally love how how you teach the tutorial. Amazing stuff here.
@DiegoSilva-dv9uf4 ай бұрын
Valeu!
@BM-vz2nb5 жыл бұрын
Very good and cool Tutorial Keith! Thanks a Ton! Loved it!
@hectordavila62494 жыл бұрын
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.
@keihinata37403 жыл бұрын
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. 😆
@ssharkwsk94394 жыл бұрын
Great videos and series Keith, Kudos to you. Keep it going....
@amankumarsingh62424 жыл бұрын
Your videos are superb. I can see your videos and just get started applying it to my project. Thank you👍.
@KeithGalli4 жыл бұрын
That's awesome! Glad you have enjoyed :)
@haigangzhang80392 жыл бұрын
Thanks a lot for the great video, I spent a few days to follow through, and learn a lot!
@barbaracosta41834 жыл бұрын
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())
@WhiteError374 жыл бұрын
thanks dude
@choutos4044 жыл бұрын
Not working for me, I used .toarray() instead.
@extremelyfunnyvideos90524 жыл бұрын
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
@SasanMaleki4 жыл бұрын
Thank you!
@timmdunker85074 жыл бұрын
Thanks! :)
@sandeepsharma-ph8id Жыл бұрын
Awesome learning material. Thanks for making it.
@carlosjacobfield-sierra37595 жыл бұрын
This video was great man, keep it up your going places.
@overgeared4 жыл бұрын
practical and nicely done. thanks! please do more videos on sklearn, maybe regression & clustering...
@azrmuradl64202 жыл бұрын
amazing! expecting more projects like this
@nabilelbilali95694 жыл бұрын
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)
@tak68tak4 жыл бұрын
Sooo POSITIVE. You really saved me. Thanks a lot!
@utkarshkapil6 ай бұрын
Relevant and super helpful in 2024 too !
@lfmtube3 жыл бұрын
Very good video! New subscriber and added to my “ Perfect videos” list. Thanks for sharing your knowledge.
@kihunkim74985 жыл бұрын
i miss your tutorial . good job !!!
@KeithGalli5 жыл бұрын
Thank you!!
@mahmoudaldeeb4524 жыл бұрын
keep going man ,you are the best
@alexanderscott24564 жыл бұрын
43:00 He's referring to Patrick Winston. By sheer chance I was watching one of his lectures on YT early this morning.
@tobiasksr235 жыл бұрын
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.
@maksimparnyakov68024 жыл бұрын
Thank you very much for proper explanation. It’s got clear after your video
@DJSEWWES2 жыл бұрын
big fan of what you are doing keep it up (y)
@atharvapatil75494 жыл бұрын
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.
@bhoomimukadam82214 жыл бұрын
@keithgalli even I want to learn face recognition using cnn plz make a video for that
@vedantvraj4 жыл бұрын
Yes Please make a video on Face Recognition.
@maherelouahabi64405 жыл бұрын
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
@andyn60535 жыл бұрын
learn to google man
@richarddoggies30384 жыл бұрын
It's a positive comment on your video about how it's cool. Thank you
@constantineveres37314 жыл бұрын
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?
@KeithGalli4 жыл бұрын
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!!! ;)
@dibyaranjansahu99714 жыл бұрын
Great tutorial,loved it
@leasrhythm4733 жыл бұрын
very nice video, so well explained for beginners! Thank you so much!
@celina62044 жыл бұрын
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')})
@adarshparihar33003 жыл бұрын
I was also having this problem, there was no result from GridSearchCV, hope you have got the solution for it.
@uchechukwumazi65122 жыл бұрын
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
@bosorensen2 жыл бұрын
Wonderfully done! Thank you!
@robingeorge72175 жыл бұрын
Please upload a real world predictive model project
@ishanpatel30865 жыл бұрын
Perfectly done!!💯✨
@KeithGalli5 жыл бұрын
Glad you thought so :)
@Max-my6rk4 жыл бұрын
Keith Galli: "I'm going insane!" ahahah
@adventurerwannabe4 жыл бұрын
that made me chuckle too lol
@piotrb51615 жыл бұрын
It's a good and hard work for... for us! Thank you Keith!
@KeithGalli5 жыл бұрын
You're very welcome! Challenging yourself is the best way to learn :)
@gregmaland53183 жыл бұрын
Thank you! This was extremely helpful. (POSITIVE)
@gianniprocida33323 жыл бұрын
Thanks for the excellent tutorial!!
@girishvenkatachalam87935 жыл бұрын
Nice...shall watch full video now
@robiparvez Жыл бұрын
awesome stuff, bro subscribed 🙂
@hemanthshankar45204 жыл бұрын
i really like the way u explain
@datastako1563 жыл бұрын
Great tutorials! a learned alot from you more powers!
@michaelpritchard23502 жыл бұрын
Keith has got it DOWN! Very instructive, thank you.
@bryantjohnston86634 жыл бұрын
Well done. Thanks for this!
@resh81984 жыл бұрын
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())