train_test_split with multiple features
If you look at sklearn.model_selection.train_test_split
, you can see it takes an *arrays
argument. To split the first three of your arguments, therefore, you could use
CS_tr, CS_te, EN_tr, EN_te, SN_tr, SN_te = train_test_split(CS, EN, SN)
(of course, you can pass more arrays than that).
Note that current versions of sklearn
return sparse arrays when given sparse arrays.