felix

Subsample Dataset

Create a subsample of the dataset using random or balanced sampling.

Creates a new dataset version with the subsampled data.

post/felix/data-editing/subsample

Request body

dataset_namestring required

Dataset name

versionstring nullable

Dataset version (latest if omitted)

method'random' | 'balanced' | 'stratified'

Subsampling method

ninteger required

Target number of rows for the whole result, not per class. For balanced and stratified methods the sample reaches this total whenever the class sizes allow; when they do not, the response carries a warning and the per-class counts achieved.

label_columnstring nullable

Column for balanced/stratified sampling

seedinteger nullable

Random seed for reproducibility

new_dataset_namestring nullable

Name for the new subsampled dataset (auto-generated if omitted)

Response

Successful Response

successboolean required
dataset_namestring required
dataset_versionstring required
new_dataset_namestring required
new_dataset_versionstring required
original_rowsinteger required
new_rowsinteger required
methodstring required
messagestring required
rows_per_classobject nullable

Rows actually drawn per class label, for the balanced and stratified methods. Null for random sampling, which has no class dimension.

warningstring nullable

Set when the result could not match the request — for example a class too small to supply its share. A subsample that under-delivers must say so here rather than returning success with an unchanged dataset.

Changes