This code divides the 150 data rows into a training data set (80%) and a testing data set (20%):
DROP TABLE IF EXISTS gmm_iris_train; DROP TABLE IF EXISTS gmm_iris_test; CREATE TABLE gmm_iris_train AS SELECT * FROM gmm_iris_input WHERE id%5!=0; CREATE TABLE gmm_iris_test AS SELECT * FROM gmm_iris_input WHERE id%5=0;
Alternatively, you can do the preceding task with the Sample or RandomSample function.