def splitIntoTrainTest(data, frac=0.1):
	"""
		Split the data into train/test sets. @frac is the fraction of data points that need to be taken to make the testing set. @data is tuple (X, Y).
		Returns ((X_train, Y_train), (X_test, Y_test))
	"""
	# Split X and Y and get the size of the dataset
	X, Y = data
	size = len(X)

	# Mark and split.
	marker = int(size * (1 - frac))
	return ((X[:marker], Y[:marker]), (X[marker:], Y[marker:]))