prep_apply

A fitted prep over a table, with explicit unseen-category and out-of-range policies.

ApplyDeterministic

Flags

Flag Value
Kind apply: uses a fitted value on a table
Rows keeps the rows
Deterministic yes
Order matters no
Decomposable yes
Makes a table value

Parameters

Parameter Type Required Notes
prep reference yes A value's reference.
table reference yes A value's reference.
response_format "concise" | "detailed" no The byte budget: 64 KiB concise, 512 KiB detailed.

Example

Over the example tables reg; ${input:name} is an input's reference and ${verb} the value an earlier call made.

JSON
split_make {
  "table": "${input:reg}",
  "kind": "random",
  "seed": 7
}

prep_fit {
  "table": "${input:reg}",
  "split": "${split_make}",
  "steps": [
    {
      "step": "scale",
      "columns": [
        "f0",
        "f1"
      ]
    }
  ]
}

prep_apply {
  "prep": "${prep_fit}",
  "table": "${input:reg}"
}

Result

300 rows prepared

JSON
{
  "ref": "sha256:2df791c22ec5e1875ad9de5f5bea727cb9deccd18935ffab9d443dd413b19bcc",
  "kind": "table",
  "rows": 300,
  "schema": {
    "fields": [
      {
        "name": "f0",
        "type": {
          "kind": "float64"
        },
        "nullable": false,
        "metadata": {}
      },
      {
        "name": "f1",
        "type": {
          "kind": "float64"
        },
        "nullable": false,
        "metadata": {}
      },
      {
        "name": "f2",
        "type": {
          "kind": "float64"
        },
        "nullable": false,
        "metadata": {}
      },
      {
        "name": "f3",
        "type": {
          "kind": "float64"
        },
        "nullable": false,
        "metadata": {}
      },
      {
        "name": "f4",
        "type": {
          "kind": "float64"
        },
        "nullable": false,
        "metadata": {}
      },
      {
        "name": "y",
        "type": {
          "kind": "float64"
        },
        "nullable": false,
        "metadata": {}
      }
    ],
    "metadata": {}
  }
}

Diagnostics

A refusal comes back as ok: false with coded diagnostics; every code, with its fix, is on the diagnostics page. A parameter that does not match the schema above is ARG_INVALID, with the parameter's path.