Documentation

    Split

    Split sends every row to exactly one of three outputs: Train, Validation or Test. Random shuffles rows the same way each time for a given Seed. Sequential keeps the input order, so the earliest rows train and the latest test. Stratify By keeps each group in the same proportion in all three.

    Split ten customers

    Manual Input holds ten customers. Split is set to Random with 60% Train, 20% Validation and Seed 42. Test gets the remaining 20%.

    The live example needs a desktop screen. The result it produces is shown here, and the explanation and settings below work on any screen.

    Result
    customerspend
    Ada120
    Lin75
    Noor60
    Kai310
    Mei95
    Eva40
    1. The preview opens on OUTPUT TRAIN with six rows: Ada, Lin, Noor, Kai, Mei and Eva.
    2. Select OUTPUT VALIDATION above the preview. It has two rows: Sam and Ravi.
    3. Select OUTPUT TEST. It has the remaining two rows: Tom and Zoe. Test always gets the rows left after Train and Validation. Every customer appears in exactly one output.
    4. Change Seed to 7. Rows move between the outputs. Set it back to 42 and you get the same split as before.

    When to use

    Use Split to prepare data for a model: train on one part and test on rows it hasn't seen. Use Sequential for anything over time, so the model never sees the future. To take a single subset, use Sample. To divide rows by a condition, use Filter.

    To take one subset of rows, use Sample.

    Inputs and outputs

    Inputs

    1 port
    InRequired

    Accepts: Tables, Geospatial data.

    Accepts one connection on this port.

    Outputs

    3 ports
    Train
    Validation
    Test

    Configure the block

    Mode

    How rows are assigned. Random shuffles rows repeatably, for regression and classification. Sequential keeps input order so the earliest rows go to Train and the latest to Test, for time series.

    Default: Random

    Options: Random, Sequential.

    Train %

    Percentage of rows routed to the Train output.

    Default: 70

    Validation %

    Percentage of rows routed to the Validation output. Set 0 to leave it empty.

    Default: 0

    Stratify By

    Optional columns whose class proportions are preserved in every split (e.g. keep each label balanced). Leave empty for a global random split.

    Seed

    Seed for the reproducible random partition.

    Default: 42

    Split FAQs

    Is there a setting for the Test share?
    No. Test gets every row left after Train % and Validation %. Together those two can't exceed 100.
    Can a row appear in more than one output?
    No. Every row goes to exactly one of Train, Validation or Test.
    Will I get the same split again?
    In Random mode, yes, with the same Seed and unchanged input. Sequential follows the input order and uses no shuffle.

    Prepare your data. Build it in Strata.

    Strata opens in your browser, with no account.