How many rows end up in X_test?
from sklearn.model_selection import train_test_split
# X has 1000 rows
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.2, random_state=42)
- 200
- 800
- 20
- 100
test_size=0.2 holds out 20% of the 1000 rows, so 200 go to the test set.
Play AI & ML ▸