course content

Course Content

Handwritten Digits Recognition: Unlocking the Magic of Machine Learning

Handwritten Digits Recognition: Unlocking the Magic of Machine Learning

Train Test SplittingTrain Test Splitting

In Python, the train_test_split function from the sklearn.model_selection module is commonly used to split a dataset into training and testing subsets.

The train_test_split() function randomly splits a dataset into two subsets: a training set and a testing set, based on the specified test size or train size.

The task is completed!

TaskCompleted

  1. Import the train_test_split function from sklearn;
  2. Use the train_test_split() to split X and y into their train and test parts;
  3. Print the size of each of target vectors (train and test).

Everything was clear?

Section 1. Chapter 6