train_test_split_no_unseen
- KGE.data_utils.train_test_split_no_unseen(X, test_size, seed)[source]
Split KG data into train and test
Split KG data into train and test, this function guarantees that the entities in test data are also present in the train data.
- Parameters
X (
np.array) – KG data to be splittedtest_size (
intorfloat) – desired test size, ifint, represents the absolute test size, iffloat, represents the relative proportion.seed (
int) – random seed
- Returns
splitted train, test KG data
- Return type
np.array,np.array