Contenido del Curso
Recognizing Handwritten Digits
Train 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.
Tarea
Swipe to show code editor
-
Split the dataset into training and test sets. Use only the first 1000 samples for splitting.
-
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
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 6