Guest User

Untitled

a guest
May 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. print X.shape, test_data.shape #gives 4100, 15) (410, 15)
  2. onehotencoder_1 = OneHotEncoder(categorical_features = [0, 3, 4, 5, 6, 8, 9, 11, 12])
  3. X = onehotencoder_1.fit_transform(X).toarray()
  4. onehotencoder_2 = OneHotEncoder(categorical_features = [0, 3, 4, 5, 6, 8, 9, 11, 12])
  5. test_data = onehotencoder_2.fit_transform(test_data).toarray()
  6.  
  7. print X.shape, test_data.shape #gives (4100, 46) (410, 43)
Add Comment
Please, Sign In to add comment