Real-World Python Machine Learning Tutorial w/ Scikit Learn (sklearn basics, NLP, classifiers, etc)
Вставка
- Опубліковано 14 чер 2024
- Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
In this video we walk through a real world python machine learning project using the sci-kit learn library. In it we work our way to building a model that automatically classifies text as either having a positive or negative sentiment. We do this by using amazon reviews as our training data. Full video timeline in the comments!
Link to Code & Data:
github.com/keithgalli/sklearn
Raw Data download:
jmcauley.ucsd.edu/data/amazon/
Sci-kit learn documentation:
scikit-learn.org/stable/docum...
Make sure you have sci-kit learn downloaded! To do this either run "pip install sklearn" or use python through Anaconda.
Join the Python Army to get access to perks!
UA-cam - / @keithgalli
Patreon - / keithgalli
---------------------------
Follow me on social media!
Instagram: / keithgalli
Twitter: / keithgalli
To get one of the cool shirts I was wearing:
/ pagandvls
---------------------------
Video outline!
0:00 - 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
---------------------
If you are curious to learn how I make my tutorials, check out this video: • How to Make a High Qua...
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
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 :)
thanks so much
please make videos on Django python full tutorial using visual studio
Thanks man
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)
can you help out with my error in the comments
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.
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.
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 :)
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.
yess exactly.... I was confused how to use stackoverflow...but after watching his real world problem tutorial.. I learnt this skill too
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 !
How are you doing now, man?
Any updates?
Hey man how you doing now
Doing well now finally! :). Will be back on youtube very soon
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
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
Please keep uploading you're one of the best tutorial channels.
Thank you!! Will do my best
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! :)
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 ;)
This video is super helpful! I have struggled in making my model using sklearning for several days and you just make my day! Thanks!
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!
This is by far the most useful tutorial that I have ever seen. You are an amazing teacher.
Keith, this is incredibly helpful. Your teaching style is to be commended. I look forward to more like this for ML.
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.
Another great video. Really appreciate minimal slides paired with the 'live' coding feel.
i always am being directed back and stay at Keith's video... just awesome...
Wow Keith, you're an absolute legend! I can't wait to get through your other videos and see your future work :D
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!
thanks man , i'm watching your whole data science video series and you are awesome!
I have implemented my first ml model with the help of you please upload more content you are amazing well done !
Thank you for this video! This saved me so much time digging through documentation to try to understand how to implement these libraries!
Really appreciate your efforts. I did not understand from my class teacher anything. Keith taught it very nicely. Thanks a lot
Dude you are an excellent educator, thank you so much for this well structured, well explained video!!
I was waiting for this! You sir, are a legend
@wise guy I think discrete math would help you grasp this
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!
This guy is like the human version of W3school, his content is simple, succinct and well thought out
Great stuff Keith. Really good. Keep doing your bit for all of us. Thanks a lot.
Wow, that is one comprehensive tutorial. Thanks for the time and effort.
Yes. Been starting out with scikit and all videos are just so so. But your videos are always great
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.
@Keith Galli this is really dope. Totally love how how you teach the tutorial. Amazing stuff here.
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
Amazing video. One won't find such tutorial on Python and Machine learning modules. It's the very video helped to complete my project.
Glad you liked it!
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 :)
Thank you! Glad it was helpful :)
Very good and cool Tutorial Keith! Thanks a Ton! Loved it!
Your videos. Are changing my life
Great video man! some of the best quality educating on youtube!
Watching the tutorial is kind of enjoyment! Have subscribed and waiting for more videos.
Glad to hear it! Thanks for the sub! :)
practical and nicely done. thanks! please do more videos on sklearn, maybe regression & clustering...
that moment of joy when i saw my model work! its like magic too good
Real helpful, made me realise New possibilities on how to go agout text data - thanks 🙂
Great videos and series Keith, Kudos to you. Keep it going....
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. 😆
Your videos are superb. I can see your videos and just get started applying it to my project. Thank you👍.
That's awesome! Glad you have enjoyed :)
Excellent tutorial to learn the fundamentals of SCI-Kit
Sooo POSITIVE. You really saved me. Thanks a lot!
Great intro - and commitment to good programming
This video was great man, keep it up your going places.
Your channel is heaven to me.
Keith man. This is an awsome video. Please make some more videos just like you did "Solving real world data science task" video.
This is great! Looking forward to more ML content like regression, decision trees, SVM.
KG Intelligence I appreciate your detailed videos on this platform
Very good video! New subscriber and added to my “ Perfect videos” list. Thanks for sharing your knowledge.
Thanks a lot for the great video, I spent a few days to follow through, and learn a lot!
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 ❤️.
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!
very nice video, so well explained for beginners! Thank you so much!
It's a good and hard work for... for us! Thank you Keith!
You're very welcome! Challenging yourself is the best way to learn :)
keith ,you are like an elder brother teaching us how to do sums.thanksssssssssssssssssssssssssss a lottttttttttttttttttttttttttt bruhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
amazing! expecting more projects like this
Hey keith,through this video just completed the first machine learning project.Thanks:).
Nice work! Your first of many to come 🤠
Letss goo! Didn't know I wanted this video until it was here
Love to hear it!!
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.
This video is so underrated. Should have atleast 500K views.
Thank you very much for proper explanation. It’s got clear after your video
finally, found another one who's lessons are understandable
Awesome learning material. Thanks for making it.
You look so young, but your ability is so good.Thanks for your explanation
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.
Excellent Tutorial Keith, Thank you very much
Glad you enjoyed! You are very welcome :)
i miss your tutorial . good job !!!
Thank you!!
keep going man ,you are the best
big fan of what you are doing keep it up (y)
Really nice and easy to understand
i really like the way u explain
I learned more in these 2 hours than my professor taught in 2 weeks. Many thanks!
Wonderfully done! Thank you!
Nice...shall watch full video now
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.
Thank you! This was extremely helpful. (POSITIVE)
awesome stuff, bro
subscribed 🙂
Thanks for the excellent tutorial!!
Great tutorials! a learned alot from you more powers!
Great tutorial,loved it
Well done. Thanks for this!
Love your tutorial a lot :D
Sir, its great tutorial, thank you!
Thank you so much. it was awesome!!
Perfectly done!!💯✨
Glad you thought so :)
This is awesome!
Well done sir..great job🔥
Learned a lot, thank you
I am like machines. I am always learning... Not watched but I believe you made your best.
Edit: I just finished this tutorial and I still support my first comment. NOICE. You are real deal!
Great video. Very didactic. Thank you.
great tutorial keith. you are incredible !!
anyways, do you have any book recommendation for studying? I'm still a new in machine learning so, it would be nice if I read a lot of book first than start studying machine learning in practically. thanks in advance!!
Great tutorial
Great tutorials ! Sentiment.POSITIVE
Jupyter-Tip: press esc + numbers 1,2,3 or 4 to create markdown header cells
thank you mate! that's amazing!
Nice! Very informative.
It's a positive comment on your video about how it's cool. Thank you
Great tutorial!!!!
wow, that's a great tutorial ❤❤❤
Hey keith that was awsome
try to upload more sklearn ml tutorials
Great tutorial!
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'