Python for Machine Learning | Label Encoding | Preprocessing - P16

preview_player
Показать описание
Python for Machine Learning | Label Encoding | Preprocessing - P16

Table of content
0:00 Introductions
00:08 What is Label Encoding
00:22 Why do we use Label Encoding
02:01 How to fill the categorical column with the modal values
02:43 Extract features and labels
03:09 Import Imputer and OneHotEncoder
03:26 Create Dataframe with only features
04:09 Label Encoding
04:14 Identify the columns on which we will apply Label Encoding
04:46 Define the object of Label Encoder
05:20 Apply Label Encoding on the respective categorical columns
05:41 Apply fit_transform on LabelEncoder()
06:14 How to create dataframe with the transformed features

Topic to be covered - Label Encoding

import pandas as pd
import numpy as np

'''Get the rows that contains NULL (NaN)'''

'''Fill the NaN values for Occupation, Emplyment Status and Employement Type'''

col = ['Occupation','Employment Status','Employement Type']

imputer = Imputer(missing_values='NaN',strategy='mean',axis=0)

'''2 step transformation
Fit and Tranform'''

'''------------------------------- L A B E L E N C O D I I N ------------------'''

encode = LabelEncoder()

All Playlist of this youtube channel
====================================

1. Data Preprocessing in Machine Learning

2. Confusion Matrix in Machine Learning, ML, AI

3. Anaconda, Python Installation, Spyder, Jupyter Notebook, PyCharm, Graphviz

4. Cross Validation, Sampling, train test split in Machine Learning

5. Drop and Delete Operations in Python Pandas

6. Matrices and Vectors with python

7. Detect Outliers in Machine Learning

8. TimeSeries preprocessing in Machine Learning

9. Handling Missing Values in Machine Learning

10. Dummy Encoding Encoding in Machine Learning

11. Data Visualisation with Python, Seaborn, Matplotlib

12. Feature Scaling in Machine Learning

13. Python 3 basics for Beginner

14. Statistics with Python

15. Sklearn Scikit Learn Machine Learning

16. Python Pandas Dataframe Operations

17. Linear Regression, Supervised Machine Learning

18 Interiew Questions on Machine Learning and Data Science

19. Jupyter Notebook Operations
Рекомендации по теме
Комментарии
Автор

Good video. However, is there a more efficient way to LabelEncode each column using a for loop?

marklee
Автор

great video but if it is logistic regression what do we do the dependent variable.encoding and onehot encoding both?

ashwinmani
Автор

Thank you, whats the process to decode and get the categorical values back?

darshanchavan
Автор

very useful session, explained very clearly.
when to use Label Encoding and one hot encoding?

explorer
Автор

please do make videos on target encoding

mukulm
Автор

Columns names have to be changed in df1 as they were in df, originally.Is there any other way?

riyajuneja
Автор

if our result is like result=[0, 1, 2, 0, 3, 1, 0] how to convert the result like this result=[red, blue, green, red, yellow, blue, red]

digitalmarketing
Автор

What does 1 indicates in
feature [1, 0] ? I know that 2nd value denotes column.

lokeshsutrave
Автор

sir, may i know what your data in Datapreprocessing.csv and prepocessing.py ?
Actually, each of my data in xml domain, and i combine it in csv, but it not read in python

yurixa
join shbcf.ru