model_evaluate

Metrics by task with bootstrap intervals; refuses train rows unless allowed.

QueryDeterministic

Flags

Flag Value
Kind query: reads values
Rows one result, not a table
Deterministic yes
Order matters no
Decomposable no
Makes a table value

Parameters

Parameter Type Required Notes
model reference yes A value's reference.
table reference yes A value's reference.
split 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
}

model_fit {
  "table": "${input:reg}",
  "split": "${split_make}",
  "family": "linear",
  "target": "y",
  "features": [
    "f0",
    "f1",
    "f2",
    "f3",
    "f4"
  ]
}

model_evaluate {
  "model": "${model_fit}",
  "table": "${input:reg}",
  "split": "${split_make}",
  "metrics": [
    "r2"
  ],
  "bootstrap": 200,
  "seed": 1
}

Result

1 metrics

JSON
{
  "ref": "sha256:f555b5728f41af13f9e2cd4ff28589c7ebce9b60c48a54c2a102bb02f609c5ab",
  "kind": "table",
  "rows": 1,
  "schema": {
    "fields": [
      {
        "name": "metric",
        "type": {
          "kind": "utf8"
        },
        "nullable": false,
        "metadata": {}
      },
      {
        "name": "value",
        "type": {
          "kind": "float64"
        },
        "nullable": true,
        "metadata": {}
      },
      {
        "name": "lower",
        "type": {
          "kind": "float64"
        },
        "nullable": true,
        "metadata": {}
      },
      {
        "name": "upper",
        "type": {
          "kind": "float64"
        },
        "nullable": true,
        "metadata": {}
      },
      {
        "name": "baseline",
        "type": {
          "kind": "float64"
        },
        "nullable": true,
        "metadata": {}
      },
      {
        "name": "baseline_lower",
        "type": {
          "kind": "float64"
        },
        "nullable": true,
        "metadata": {}
      },
      {
        "name": "baseline_upper",
        "type": {
          "kind": "float64"
        },
        "nullable": true,
        "metadata": {}
      }
    ],
    "metadata": {}
  },
  "items": [
    {
      "metric": "r2",
      "value": 0.9939164516961236,
      "lower": 0.9887939685065961,
      "upper": 0.9968037381938318,
      "baseline": -0.009488869740732264,
      "baseline_lower": -0.11552110248304141,
      "baseline_upper": -0.00004711887094879784
    }
  ]
}

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.