First time here? Checkout the FAQ!
x
0 votes
294 views
asked in Machine Learning by (230 points)  
  
commented by (115k points)  
Please clarify your question by providing an example
commented by (230 points)  
actually, I have found out the answer. every parameter of list of the column, the OneHotEncoder() will detect how many categorial variable there are. if 2 choices, then create one new column to representing the choice just by Binary variable(1, 0). so if 3 choices for the categorial variable, then it will create 2 more columns to show all the binary variables. So you need see whether is necessary, usually the 2 choice , you only need one of them to minimize the data size. and choice of 3 , only need 2 of them to show the actual value. so you need manually minimize to optimal condition.

1 Answer

0 votes
answered by (115k points)  
As you descierbed in the comments, additional columns are used as dummy variables.
...