About train_test_split

  • train_test_split function matrix for randomly divided into a training subset and a test subset, and returns the training set is divided good training set and test set samples test set labels.
  • X_train,X_test, y_train, y_test =cross_validation.train_test_split(train_data,train_target,test_size=0.3, random_state=0)
    • train_data: Sample feature set is divided
    • train_target: divided sample labels
    • test_size: If the float is between 0-1, showing the proportion of the sample; if it is an integer number of samples
    • random_state: a random number seed

Guess you like

Origin www.cnblogs.com/rener0424/p/11329666.html