HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

Machine Learning Tutorial Python - 6: Dummy Variables & One Hot Encoding

508,371 views October 28, 2018 21:35

Watch on YouTube
Channelcodebasics

Chapters

Description from the creator

Machine learning models work very well for dataset having only numbers. But how do we handle text information in dataset? Simple approach is to use interger or label encoding but when categorical variables are nominal, using simple label encoding can be problematic. One hot encoding is the technique that can help in this situation. In this tutorial, we will use pandas get_dummies method to create dummy variables that allows us to perform one hot encoding on given dataset. Alternatively we can use sklearn.preprocessing OneHotEncoder as well to create dummy variables.

#MachineLearning #PythonMachineLearning #MachineLearningTutorial #Python #PythonTutorial #PythonTraining #MachineLearningCource #OneHotEncoding #sklearntutorials #scikitlearntutorials

Code in tutorial: github.com/codebasics/py/blob/master/ML/5_one_h…

Exercise csv file: github.com/codebasics/py/blob/master/ML/5_one_h…

Exercise solution: github.com/codebasics/py/blob/master/ML/5_one_h…

Topics that are covered in this Video:
0:00 Introduction
0:47 How to handle text data in machine learning model?
1:38 Nominal vs Ordinal Variables
2:44 Theory (Explain one hot encoding using home prices in different townships)
3:39 Coding (Start)
3:51 Pandas get_dummies method
7:48 Create a model that uses dummy columns
12:45 Label Encoder
13:29 fit_transform() method
15:40 sklearn OneHotEncoder
19:59 Exercise (To predict prices of car based on car model, age, mileage)

Do you want to learn technology from me? Check resources.codebasics.io/Igmopd for my affordable video courses.

Next Video:
Machine Learning Tutorial Python - 7: Training and Testing Data: youtube.com/watch?v=fwY9Qv96DJY&list=PLeo1K…

Populor Playlist:
Data Science Full Course: youtube.com/playlist?list=PLeo1K3hjS3us_ELKYSj_…

Data Science Project: youtube.com/watch?v=rdfbcdP75KI&list=PLeo1K…

Machine learning tutorials: youtube.com/watch?v=gmvvaobm7eQ&list=PLeo1K…

Pandas: youtube.com/watch?v=CmorAWRsCAw&list=PLeo1K…

matplotlib: youtube.com/watch?v=qqwf4Vuj8oM&list=PLeo1K…

Python: youtube.com/watch?v=eykoKxsYtow&list=PLeo1K…

Jupyter Notebook: youtube.com/watch?v=q_BzsPxwLOE&list=PLeo1K…

To download csv and code for all tutorials: go to github.com/codebasics/py, click on a green button to clone or download the entire repository and then go to relevant folder to get access to that specific file.

Tools and Libraries:
Scikit learn tutorials
Sklearn tutorials
Machine learning with scikit learn tutorials
Machine learning with sklearn tutorials

🌎 My Website For Video Courses: resources.codebasics.io/Igmopd

Need help building software or data analytics and AI solutions? My company atliq.com/ can help. Click on the Contact button on that website.

#️⃣ Social Media #️⃣
🔗 Discord: discord.gg/r42Kbuk
📸 Codebasics Instagram: instagram.com/codebasicshub/
🔊 Codebasics Facebook: facebook.com/codebasicshub
📝 Codebasics LinkedIn: linkedin.com/company/codebasics/
📱 Codebasics X handle: twitter.com/codebasicshub
📸 Dhaval's Instagram: instagram.com/dhavalsays/
📝 Dhaval's LinkedIn: linkedin.com/in/dhavalsays/
📱 Dhaval's X handle: x.com/dpcodebasics
🔗 Patreon: patreon.com/codebasics?fan_landing=true

About this tutorial

codebasics published this 21:35 video tutorial on October 28, 2018. It has been watched 508,371 times on YouTube.

Channel
codebasics
Category
Education
Duration
21:35
Published
October 28, 2018
Views
508,371
Likes
7,055

Tags

Share

This tutorial in other languages