text_plain_output_1.png
from sklearn.model_selection import train_test_split

import numpy as np

import pandas as pd

meta_vir = pd.read_csv('../input/rsna-2022-spine-fracture-detection-metadata/meta_train_with_vertebrae.csv')

y = meta_vir.iloc[:3408, 9:]
y.shape

del y['overall']
y.z_total.value_counts()

labels = np.array(y)
labels.shape

X_train, X_valid, y_train, y_valid = train_test_split(image_files_list, labels, random_state=20, test_size=0.3, stratify=labels)
(len(X_train), len(X_valid), y_train.shape, y_valid.shape)