Menu

Splitting the Dataset

Splitting the Dataset

Scikit-learn provides a simple method for creating training and testing datasets.

Code

**from sklearn.model_selection import train_test_split**

The train_test_split() function automatically divides the dataset into training and testing subsets.