text_html_output_1.png
from sklearn.model_selection import train_test_split

import pandas as pd

import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
CSV_PATH = '/kaggle/input/iris/Iris.csv'
ID = 'Id'
TARGET = 'Species'
TEST_SIZE = 0.3
VAL_SIZE = 0.3
SEED = 2023

total = pd.read_csv(CSV_PATH)

y = total[TARGET]
X = total.drop([TARGET], axis=1)

X_trainval, X_test, y_trainval, y_test = train_test_split(X, y, test_size=TEST_SIZE, random_state=SEED, stratify=y)
print('train+val set = ', len(X_trainval), ' test set', len(X_test))