Sklearn Train Test Split
AI-generatedSummary
Splits incoming data into training and test sets using scikit-learn's train_test_split, returning two output arrays.
Inputs
- main (required) — Array of input items, each containing a JSON object with the record's fields.
Output shape
split
The node has two output connectors named Train and Test. Each output contains a subset of the input items, enriched with a _split field indicating the set membership.
Examples
Example 1: Basic random split
testSize: 0.2, shuffle: true, randomState: 42, stratifyColumn: ''
Example 2: Stratified split on a categorical target
testSize: 0.3, shuffle: true, randomState: 123, stratifyColumn: 'target'