<jupyter_start><jupyter_text>Split<jupyter_code>import numpy as np
np.bincount(df['age'].values)
indices = np.arange(df.shape[0])
labels = df['age'].values
from sklearn.model_selection import train_test_split


indices_train, indices_test, labels_train, labels_test = train_test_split(
    indices, labels, test_size=0.2, random_state=123, shuffle=True, stratify=labels)

indices_train, indices_valid, labels_train, labels_valid = train_test_split(
    indices_train, labels_train, test_size=0.05, random_state=123, shuffle=True, stratify=labels_train)
df_train = df.iloc[indices_train]
df_train.to_csv('afad_train.csv', index=None)

df_valid = df.iloc[indices_valid]
df_valid.to_csv('afad_valid.csv', index=None)

df_test = df.iloc[indices_test]
df_test.to_csv('afad_test.csv', index=None)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12195121951219512, 'fraction_numerical': 0.014634146341463415, 'mean_word_length': 8.773809523809524, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '654194', 'license': 'MIT', 'n_tokens_mistral': 314, 'n_tokens_neox': 304, 'n_words': 47, 'path': 'notebooks/04_afad-splits.ipynb', 'repo_name': 'Raschka-research-group/corn-ordinal-neuralnet', 'size': '820'}