def train_validation_split(x, y):
Splits train and validation data and images. (Will also load test images, names from saved array).
Input: saved numpy array, files/columns in that array
Output: Train/validation data (e.g., X_train, X_test, y_train, y_test), test images, test image names (file names minus '.png')
number = LabelEncoder()
y = number.fit_transform(y.astype('str'))
X_training, X_test_holdout, y_training, y_test_holdout = train_test_split(x, y, stratify=y, random_state=42, test_size=.2)
print('Initial split for (holdout) test data:\n \
X_training: {} \n \
y_training: {} \n \
X_test_holdout: {} \n \
y_test_holdout: {} \n'.format(X_training.shape, y_training.shape, X_test_holdout.shape, y_test_holdout.shape))
X_train, X_test, y_train, y_test = train_test_split(X_training, y_training, stratify=y_training, random_state=seed, test_size=.2)
train_classes = len(np.unique(y_train))
test_classes = len(np.unique(y_test))
print('Train/validation split for this model:\n \
X_train: {} \n \
y_train: {} \n \
X_test: {} \n \
y_test: {} \n \