Problem 1: Basic Train-Test Split
Easypython
Problem Description
Write a Python program that splits a dataset into training (80%) and testing (20%) sets using train_test_split(), and prints the resulting shapes.
Input
A dataset with features (X) and a label (y).
Output
The shapes of Xtrain, Xtest, ytrain, and ytest.
Constraints
- The dataset will contain at least 10 rows.
Example Input
textX with 100 rows, y with 100 rows, test_size=0.2
Example Output
textX_train shape: (80, n_features) X_test shape: (20, n_features)
Concepts Covered
train_test_split(), test_size.