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: - tbl : CASTable
The CAS table to split
- test_rate : double, optional
Specifies the proportion of the testing data set, e.g. 20 mean 20% of the data will be in the testing set.
- stratify : boolean, optional
If True stratify the sampling by the stratify_by column name If False do random sampling without stratification
- im_table : boolean, optional
If True outputs are converted to an imageTable If False CASTables are returned with all columns
- stratify_by : str, optional
Specifies the column name to be used while stratifying the input data.
- image_col : string
Name of image column if returning ImageTable
- train_name : string
Specifies the output table name for the training set
- test_name : string
Specifies the output table name for the test set
- columns : list of column names
Specifies the list of columns to be copied over to the resulting tables.
- kwargs : keyword 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 )