Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Train Test Split | Recognizing Handwritten Digits
Recognizing Handwritten Digits
course content

Зміст курсу

Recognizing Handwritten Digits

bookTrain Test Split

In Python, the train_test_split function, part of the sklearn.model_selection module, is frequently utilized for dividing a dataset into two parts: a training subset and a testing subset.

This train_test_split() function performs a random partitioning of the dataset into these subsets, determined by a predefined test size or train size.

Завдання
test

Swipe to show code editor

  1. Split the dataset into training and test sets. Use only the first 1000 samples for splitting.

  2. Print the shapes and sizes of the resulting training and test sets for both the feature matrix and the target vector.

Mark tasks as Completed
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

In Python, the train_test_split function, part of the sklearn.model_selection module, is frequently utilized for dividing a dataset into two parts: a training subset and a testing subset.

This train_test_split() function performs a random partitioning of the dataset into these subsets, determined by a predefined test size or train size.

Завдання
test

Swipe to show code editor

  1. Split the dataset into training and test sets. Use only the first 1000 samples for splitting.

  2. Print the shapes and sizes of the resulting training and test sets for both the feature matrix and the target vector.

Mark tasks as Completed
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 6
AVAILABLE TO ULTIMATE ONLY
We're sorry to hear that something went wrong. What happened?
some-alt