Skip to content

Table KNIME Random Sample

The Table: KNIME Random Sample step makes the random draw of a KNIME node with the random number generator KNIME uses, so a node with a seed draws the same rows or values in PlaidCloud as in KNIME. Migrated KNIME workflows use this step for Row Sampler, Table Partitioner, Equal Size Sampling, Bootstrap Sampling, Shuffle, X-Partitioner, and the random data generation nodes.

The draw reads the source table into the workflow, so it takes a table of at most 10,000,000 rows; a larger table fails the step.

The step form has a Tables section for the source and output tables, a Draw section for the Method, Seed and sample size, and a Columns section for the columns read and written.

  • source and target_frame — the table to read and the table to write.
  • position_column — the column holding each row’s 0-based position. The default is _knime_pos.
  • method — the draw:
    • random, stratified, equal_exact and equal_approximate keep the positions of the rows a Row Sampler, Table Partitioner, or Equal Size Sampling draw selects. class_column and class_dtype name the class column of a stratified or equal-size draw.
    • Every other method writes its draw beside the row positions: uniform, gaussian, gamma, beta, label, label_dependent, label_from_table, boolean, mersenne_twister, sobol and halton (random data generation), shuffle, bootstrap, match (Random Matcher), item_insert (Random Item Inserter), stress (Stresser), sample_data (Sample Data Generator, with no source table), kfold (X-Partitioner folds), p_square (P² percentile estimates per group), set_bits (bit vectors), equal_count_edges (the Binner’s equal-count borders) and border_texts (the Auto-Binner’s border texts).
  • seed — the seed of the random stream. Empty draws from the clock, as KNIME does without a seed, so the rows differ from run to run.
  • count, percentage and relative — how many rows to draw: a count, or with relative a percentage. count_column takes the count from a source column instead, for a count known only when the workflow runs.
  • parameters — the node’s settings that the draw methods read, such as the distribution of a gaussian draw or the number of folds of a kfold draw.
  • source_columns and target_columns — for the draw methods, the columns read and the columns written, with the position column first.
  • source_b and source_columns_b — a second input, such as the category table of label_from_table or the table match draws from. target_frame_b and target_columns_b receive the cluster centers of sample_data.