Тёмный

Encoding Categorical Data | Ordinal Encoding | Label Encoding 

CampusX
Подписаться 214 тыс.
Просмотров 85 тыс.
50% 1

Encoding Categorical Data involves techniques like Ordinal Encoding and Label Encoding, which assign numeric values to categorical variables, facilitating model interpretation.
Code used : github.com/campusx-official/1...
============================
Do you want to learn from me?
Check my affordable mentorship program at : learnwith.campusx.in/s/store
============================
📱 Grow with us:
CampusX' LinkedIn: / campusx-official
CampusX on Instagram for daily tips: / campusx.official
My LinkedIn: / nitish-singh-03412789
Discord: / discord
Instagram: / campusx.official
E-mail us at support@campusx.in
⌚Time Stamps⌚
00:00 - Intro
00:35 - Revision
03:06 - What is Ordinal data
05:27 - Label Encoding
07:09 - How ordinal encoding works?
09:20 - Code Example

Опубликовано:

 

15 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 89   
@dishitvasoliya9033
@dishitvasoliya9033 Год назад
I purchased a data science course with around 50k fees but even that they are not teaching this level education. You are such fabulous person.. 👍
@akash.deblanq
@akash.deblanq 3 года назад
wow I was so confused about column transformer and why everyone is using that. I was so confused. People usually include that in the encoding videos without any explanation. You are the first person to explain it separately in your series. I am amazed. Thank you Nitish, I will remember you throughout my journey.
@hamzayaseen9963
@hamzayaseen9963 4 дня назад
This is a great channel. I'm glad I found it. Thank you so much, Sir, for making this so simple.
@mridang2064
@mridang2064 Год назад
Never knew about Label encoder and Ordinal encoder, I used to apply label encoder on input features, thanks for this hidden insight Nitish Sir.
@arhaanahmad3953
@arhaanahmad3953 8 дней назад
Well explained. This really helped me to improve my understanding of ML. Thank you sir.
@sneharj2036
@sneharj2036 Год назад
Thanku so much for clearing concepts of encoding technique with example. Very helpful n informative video.
@paragvachhani4643
@paragvachhani4643 Год назад
Sir kya bolo...just itna hi U r doing great job...with quality conceptual clearity...
@siyays1868
@siyays1868 Год назад
Thanku so much for clearing encoding concepts. Very good explaination with example.
@muhammadtayyabtahirqureshi7186
@muhammadtayyabtahirqureshi7186 11 месяцев назад
explicit and to-the-point 👍
@ajaykushwaha4233
@ajaykushwaha4233 3 года назад
Best explanation ever 🙏🏻
@zkhan2023
@zkhan2023 3 года назад
Sir, you are doing a great job
@osho_magic
@osho_magic Год назад
M first time comment kar rha ,, Kosi channel p because info is really precious ,,, quality bole to Nitish sir
@debasissahoo7559
@debasissahoo7559 8 месяцев назад
You are great efforts 👌 a appreciate you god bless ❤
@SACHINKUMAR-px8kq
@SACHINKUMAR-px8kq Год назад
Thanks Sir for this Amazing Session
@sumitb2015
@sumitb2015 Год назад
Excellent explanation 👍
@talkswithRishabh
@talkswithRishabh 2 года назад
Too good content sir it is helping me alot
@devilsworld7299
@devilsworld7299 Месяц назад
one quick question sir we can do this isntead of these sklearn function this way we can arrange and give orders to our data and its fast too easy to understand instant output df.education[df['education'] == 'School'] = 0 df.education[df['education'] == 'UG'] = 1 df.education[df['education'] == 'PG'] = 2 df.review[df['review'] == 'Poor'] = 0 df.review[df['review'] == 'Average'] = 1 df.review[df['review'] == 'Good'] = 2 df.purchased[df['purchased'] == 'Yes'] = 1 df.purchased[df['purchased'] == 'No'] = 0
@user-wk8fh2ub8b
@user-wk8fh2ub8b 9 месяцев назад
You Are Really Great Sir
@_Mahesh-nh7xv
@_Mahesh-nh7xv Месяц назад
Best explanation ever
@narendraparmar1631
@narendraparmar1631 7 месяцев назад
Great Content Thank You😀
@kushagalashravanthi-go3sg
@kushagalashravanthi-go3sg 10 месяцев назад
Super explanation sir❤
@heetbhatt4511
@heetbhatt4511 10 месяцев назад
Thank you sir
@sandipansarkar9211
@sandipansarkar9211 Год назад
finished watching and coding
@MuhammadJunaid-yr8jd
@MuhammadJunaid-yr8jd Год назад
thank you so much
@a_wise_person
@a_wise_person Год назад
The way you teach is amazing sir , i was trying for months to learn ML , finally i am glad that i found you .
@Dsutradhar
@Dsutradhar Год назад
I dont know why this channel is not famous
@yogeshsapkal2593
@yogeshsapkal2593 2 года назад
sir hamane classes karake bhi hamko yeh concept nahi sikhaee...thank you sir
@aditirawat9841
@aditirawat9841 2 года назад
recommend these tutorials to aspiring data scientist
@santanubag358
@santanubag358 Год назад
You And Krish Naik Sir are the Brahma And Bishnu Of Data Science.
@rahulsah5918
@rahulsah5918 Год назад
Right sir
@yashjain6372
@yashjain6372 Год назад
loved it
@meenalpande
@meenalpande Год назад
Nice explanation
@arman_shekh97
@arman_shekh97 3 года назад
maine socha ajj video nhi ayegi but thank you
@arpittrivedi6636
@arpittrivedi6636 Год назад
Kabhi-2 main sochta hu agar aap nahi hote to hamara kya hota. Great explanation
@campusx-official
@campusx-official Год назад
The feeling is mutual sir
@tusharkhatri5795
@tusharkhatri5795 Год назад
I have one doubt during train test split we are fitting on training data while transforming both training and testing suppose this was standardization case then if we fit of train data we get mean and variance of that how can we transform test data using this train data mean and var . I just mean test data should be independent of train data there shouldnt be any type of relationship between them to prevent data leakage . So we must calculate seperate mean and variance for both train and test and fit tranform individually? Pls clarify
@satyampandey8650
@satyampandey8650 3 года назад
Sir then which encoder we should apply on feature which are not ordinal
@Sumitrawat112
@Sumitrawat112 Год назад
can we perfom label encoding and oridinal encoding before train test split
@evergreenonce5456
@evergreenonce5456 Год назад
11:18 *Encoding to Categorical Features*
@ajitchaturvedi4052
@ajitchaturvedi4052 Год назад
Please make one vedio on neural architecture search
@saumyashah6622
@saumyashah6622 3 года назад
"Whenever we are doing a project, instead of train_test_split, we should always do k-fold cross validation." Sir, is my thinking correct ?? If wrong, please rectify me.
@campusx-official
@campusx-official 3 года назад
Yes, or some other form of cross valuation
@user-px7de6up2m
@user-px7de6up2m 5 месяцев назад
sir plz make a video on high cardinality categorical value
@user-wj8my7hw9x
@user-wj8my7hw9x 7 месяцев назад
Does it matter if the output column is ordinal or nominal before applying label encoding? How to do encoding of categorical feature column with high cardinality? Please help me
@taruchitgoyal3735
@taruchitgoyal3735 10 месяцев назад
Hello Sir, Thank you for the session. Can we extend concept of ordinal encoding on numeric column such as Age? Like in your dataset at 11.45, the values of column Age are: - 98, 16, 53, 69, 77. With more number of records we will have more number of distinct values under the column and at maximum we can have 100 values. Thus, if we classify the numeric values into categories will that not help to make our data analysis and ML model better? For example: We can have a category: Teenager for all Age values from 13 to 19., College students: 20 to 23, Young professionals: 24 to 30, Mid age: 31 to 65 and Senior citizen: 66 to 99. And then finally apply Ordinal encoding on these categories since now we will have order among the classified values. It would be very helpful sir to seek your views on the above. Thank you
@HimanshuSharma-we5li
@HimanshuSharma-we5li 2 года назад
It would be great if there is dataset link in aal the videos.
@kamilshaikh1602
@kamilshaikh1602 2 года назад
what to do if the number of features are high (ordinal ones)? I have 40 such features
@chetanchavan647
@chetanchavan647 Год назад
Best
@maramreddysrikanth5464
@maramreddysrikanth5464 9 месяцев назад
when ordinalencoding or onehotencoding done using coloumn transformer the output array columns index are changed i mean encoding done on 5th coloumn after tranformation it is appering to be 1st in array after transformation any solution
@tejaskamble8731
@tejaskamble8731 5 месяцев назад
❤🔥🔥
@mohitkushwaha8974
@mohitkushwaha8974 Год назад
Doubt 1. Can't we use ordinal encoding and label encoding before X train and Xtest split???? It would have been an easy task to do the encoding before its split. 2. Cant we use replace function of pandas like replace yes and no to 1 and 0, and replace poor , avg and good to some value like 0, 1 2
@user-qp9fj3vv8n
@user-qp9fj3vv8n 5 месяцев назад
Hello sir, which lecture has the introduction to sk learn library?
@lol-ki5pd
@lol-ki5pd 14 дней назад
oe = OrdinalEncoder(categories=[['Poor','Average','Good'],['School','UG','PG']]) when we have this already defined, so why we need to do oe.fit(X_train) I mean, how will it acutally help when all the calculation was done on oe in first line?
@promitdutta3029
@promitdutta3029 9 месяцев назад
why label encoding can't used to transform input columns ?
@manikantareddy298
@manikantareddy298 Год назад
What if there are null values in education column and then how should we start the process?
@arshad1781
@arshad1781 3 года назад
zy sub samjh aey gia but need a video after Encoding us py Analysis kesi kry ge aur fine result ko kesi again male female or yes and no mi change kry gy, after 2 or 3 video bad uni video py practical project video bi bny, problem zy ha transform data ho gye ab usi py analysis kesi kry? final output kesi pta chly zy male ha?
@akshatbhoir1072
@akshatbhoir1072 Год назад
Sir if there are yes/no data in data then which encoding should be used? Please clear my this doubt
@saakshidikshit
@saakshidikshit 4 месяца назад
Can somebody explain me what order should be followed while doing any ML Project. Like whether feature scaling should be applied first or encoding categorical data should be done etc. Would be extremely grateful if someone can please clarify. Thanx.
@subhajitdey4483
@subhajitdey4483 Год назад
Sir what will happen if the output is categorical data but nominal, should I apply Label Encoding there also...?? Actually I want to say that If the output data is categorical, may be that Nominal / Ordinal, in both of case should I apply Label Encoding....?? Thank you for this video🙂
@tarunchauhan2339
@tarunchauhan2339 Год назад
in ordinal encoding an error is raised: Shape mismatch: if categories is an array, it has to be of shape (n_features,) can any one resolve please
@ParallelUniverse550
@ParallelUniverse550 6 месяцев назад
In label encoding how would the object know whether to map 0 to 'NO ' and 1 to 'YES'. As we didnt specify.
@Star-xk5jp
@Star-xk5jp 6 месяцев назад
day2-date:10/1/24
@geethanshr
@geethanshr Месяц назад
At 16:29 why didn't we convert our transformed numpy array to dataframe?
@MRAgundli
@MRAgundli 2 месяца назад
done
@aj_ai
@aj_ai Год назад
👾👾👾
@ajaykushwaha-je6mw
@ajaykushwaha-je6mw 3 года назад
I got he concept but all information are in array, do we need to convert them into DF and merge to proceed further ?
@campusx-official
@campusx-official 3 года назад
Instead you can use a transformer
@sid_x_18
@sid_x_18 8 месяцев назад
Why do we even do Label Encoding on target column . I mean that is essentially just 0s and 1s right ? So why we just can’t create dummies ? What’s the logic behind using Label Encoding here ?
@monikrayu2546
@monikrayu2546 4 дня назад
bol sakte hai sir 3:02
@piyushnirwan6298
@piyushnirwan6298 3 года назад
don't we have to convert the array output in dataframe after transformation is done
@campusx-official
@campusx-official 3 года назад
Not required
@shreejanshrestha1931
@shreejanshrestha1931 2 года назад
I think sir did in previous videos just be make us visualize the numpy array into the better form.
@darshedits1732
@darshedits1732 8 месяцев назад
sir csv file are not download please help me urgent
@osho_magic
@osho_magic Год назад
Jitni tareef ki Jae Kam h . ..
@annyd3406
@annyd3406 Год назад
11 20 to 12 10 - why column transformer
@user-vh2pd7us9z
@user-vh2pd7us9z 11 месяцев назад
how to download dataset from your Github ,it is showing "raw file download" and not downloading please help anyone
@campusx-official
@campusx-official 11 месяцев назад
Copy the url and load directly in pandas
@tradingbrothers1126
@tradingbrothers1126 Год назад
kaggle pay nhi milra
@harshkondkar3193
@harshkondkar3193 2 года назад
How to deal with the situation where there are unseen categories in the test data?
@rachitsingh4913
@rachitsingh4913 Год назад
its always good to apply encoding without train test split .
@anjushac9307
@anjushac9307 8 месяцев назад
The encoders have additional parameters that you can set to decide what to do incase unseen categories are encountered in the test data. You can check the documentation for more details
@harshkondkar3193
@harshkondkar3193 8 месяцев назад
@@anjushac9307 will check the doc. Thanks!!
@harshmishra7774
@harshmishra7774 2 года назад
Engg branch should be the example of ordinal data 🤣
@tradingbrothers1126
@tradingbrothers1126 Год назад
sir data set upload kar o
@user-vh2pd7us9z
@user-vh2pd7us9z 11 месяцев назад
Please help anyone
@1981Praveer
@1981Praveer Год назад
Q. If we have a big dataset. let's say Housing_price.csv(from Kaggle), then how would I know which column has ordinal data? is there any API to check? @CampusX #CampusX
@ajaykushwaha4233
@ajaykushwaha4233 3 года назад
Best explanation ever 🙏🏻
@Ganeshjadhav2808
@Ganeshjadhav2808 2 года назад
thank you sir
Далее
Logistic Regression Part 1 | Perceptron Trick
47:06
Просмотров 94 тыс.