Skip to content

OneHotEncoder() drop='first' #50

Discussion options

You must be logged in to vote

Hey, @shashwat9kumar It might be true for instances where your problem suffers from multicollinearity, where more than 1 independent variable is related to your dependent variable.
In this case drop = "first" will work during encoding it reduces the problem of multicollinearity by a minimum level.

If your problem is multicollinearity? then you can use drop = first if not the default would work. This is the one reason I know and there might be n number of reasons to use drop = 'first'.

Tbh the documentation says the same, I attached a pic below

Hope it helps!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shashwat9kumar
Comment options

Answer selected by mrdbourke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants