#15: Scikit-learn 12: Preprocessing 12: Categorical: OrdinalEncoder, OneHotEncoder
The video discusses the intuition and code to numerically encode categorical data using OrdinalEncoder() and OneHotEncoder() in Scikit-learn in Python. Time...
🔥 Related Trending Topics
LIVE TRENDSThis video may be related to current global trending topics. Click any trend to explore more videos about what's hot right now!
THIS VIDEO IS TRENDING!
This video is currently trending in Thailand under the topic 'สภาพอากาศ'.
About this video
The video discusses the intuition and code to numerically encode categorical data using OrdinalEncoder() and OneHotEncoder() in Scikit-learn in Python.
Timeline
(Python 3.8)
00:00 - Outline of video
00:36 - What are categorical features?
01:30 - Why is there a need to encode categorical features?
03:09 - What are ordered categories?
04:09 - Code snippet
05:52 - Open Jupyter notebook
06:06 - Data
06:21 - OrdinalEncoder(): (default) categories='auto'
10:01 - OrdinalEncoder(): categories= -*custom order*-
12:30 - OneHotEncoder(): (default)
16:20 - OneHotEncoder(): specify list of categories
20:35 - OneHotEncoder(): handle_unknown='ignore'
22:27 - OneHotEncoder(): drop='if_binary'
26:25 - DictVectorizer(): one hot encode categories from a dictionary
29:21 - Collinearity: Matrix with determinant = zero
30:42 - Ending notes
########
# Data
########
game = [
['first', 'gold', 'top'],
['second', 'silver', 'middle'],
['third', 'bronze', 'bottom']
]
x = [
['football', 'helmet', 'ground'],
['basketball', 'shoes', 'net'],
['cricket', 'bat', 'pitch'],
['tennis', 'band', 'court']
]
h = [
['male', 'truck', 'blue'],
['female', 'car', 'green'],
['male', 'bike', 'gray']
]
plants = [
{'fruit': 'pear', 'weight': 178.},
{'fruit': 'pomegranate', 'weight': 250.},
{'fruit': 'cherry', 'weight': 5.}
]
Video Information
Views
1.2K
Total views since publication
Likes
25
User likes and reactions
Duration
31:24
Video length
Published
Dec 17, 2020
Release date
Quality
hd
Video definition
About the Channel
Tags and Topics
This video is tagged with the following topics. Click any tag to explore more related content and discover similar videos:
#what is categorical data #OrdinalEncoder #OneHotEncoder #ordered categories #Scikit-learn tutorial #preprocessing #python in data science #python tutorial for data science #learn python #python for intermediate #coding in python #python in data analytics #Data analytics #data science #Data scientist
Tags help categorize content and make it easier to find related videos. Browse our collection to discover more content in these categories.