dlpy.splitting.two_way_split

dlpy.splitting.two_way_split(tbl, test_rate=20, stratify=True, im_table=True, stratify_by='_label_', image_col='_image_', train_name=None, test_name=None, columns=None, **kwargs)

Split image data into training and testing sets

Parameters
tblCASTable

The CAS table to split

test_ratedouble, optional

Specifies the proportion of the testing data set, e.g. 20 mean 20% of the data will be in the testing set.

stratifyboolean, optional

If True stratify the sampling by the stratify_by column name If False do random sampling without stratification

im_tableboolean, optional

If True outputs are converted to an imageTable If False CASTables are returned with all columns

stratify_bystr, optional

Specifies the column name to be used while stratifying the input data.

image_colstring

Name of image column if returning ImageTable

train_namestring

Specifies the output table name for the training set

test_namestring

Specifies the output table name for the test set

columnslist of column names

Specifies the list of columns to be copied over to the resulting tables.

kwargskeyword arguments, optional

Additional keyword arguments to the sample.stratified or sample.src actions. For details see sample.stratifed and sample.srs

Returns
( training CASTable, testing CASTable )