cerebral.features.train_test_split(data, train_percentage=0.75) tuple[DataFrame, DataFrame][source]

Split data into training and test subsets, ensuring that similar compositions are grouped together. See Section 3.1 of https://doi.org/10.1016/j.actamat.2018.08.002, and Section 4.1 of https://pubs.rsc.org/en/content/articlelanding/2022/dd/d2dd00026a.

If there is a composition type which dominates the dataset (over 60% of the compositions), standard random splitting will be applied to avoid very small training or test sets.

Parameters:
data

The dataset of alloy compositions.

train_percentage=0.75

The proportion of data to be separated into the training set.


Last update: Feb 09, 2023