Random split

 

Randomly divide the the train set and test set in a 7:3 ratio of the Titanic data.


A

1

=file("D://titanic.csv").import@qtc()

2

=A1.group(rand()<=0.3)

3

=train=A2(1)

4

=test=A2(2)

A2 The sample data were randomly divided into two groups according to a ratio of 7:3

A3 Train set

A4 Test set