I cannot import the cross_validation from sklearn library; I use sklearn version 0.20.0
from sklearn import cross_validation
later in the c
cross_validation
used to exist as a Scikit package*, but was deprecated at some point.
If you're looking for train_test_split
as your code indicates, it's in model_selection
:
from sklearn import model_selection
features_train, features_test, labels_train, labels_test = model_selection.train_test_split(
word_data, authors, test_size=0.1, random_state=42)
*Looks like this changed in 0.18.