Fix addressing issue 238. We introduce the ability to create a training set using the split method of the subsample class with a fraction between 0 and 1 representing the proportion of the training set. The option to specify an integer representing the number of elements in the training set is still retained
Type of change
Bug fix
In the case where the attribute self.n_samples is a float, the feature n_samples used in the split method of Subsample class becomes self.n_samples * X.shape[0], taking its floor integer part
How Has This Been Tested?
Test test_split_SubSample_n_samples
We check that the training and test sets build using the split method are as expected with the given seed. We use two instances of Subsample, one with an integer n_samples and the other with an n_samples less than 1
Description
Fix addressing issue 238. We introduce the ability to create a training set using the split method of the subsample class with a fraction between 0 and 1 representing the proportion of the training set. The option to specify an integer representing the number of elements in the training set is still retained
Type of change
In the case where the attribute self.n_samples is a float, the feature n_samples used in the split method of Subsample class becomes self.n_samples * X.shape[0], taking its floor integer part
How Has This Been Tested?
We check that the training and test sets build using the split method are as expected with the given seed. We use two instances of Subsample, one with an integer n_samples and the other with an n_samples less than 1
Checklist
make lint
make type-check
make tests
make coverage
make doc