Training and Testing Data

sklearn.model_selection.train_test_split method is used in machine learning projects to split available dataset into training and test set. This way you can train and test on seperate datasets. When you test your model using dataset that model didn't see during training phase, it will give you better idea on the accuracy of a model.