cv_run
Cross-validated evaluation of a prep and model spec.
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 |
|---|---|---|---|
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.
split_make {
"table": "${input:reg}",
"kind": "random",
"seed": 9
}
cv_run {
"table": "${input:reg}",
"split": "${split_make}",
"model": {
"family": "ridge",
"alpha": 1,
"target": "y",
"features": [
"f0",
"f1",
"f2",
"f3",
"f4"
]
},
"folds": {
"kind": "kfold",
"k": 5
},
"metrics": [
"r2"
]
}Result
1 metrics cross-validated
{
"ref": "sha256:54d1b2aee27518737b7d9a72c228fa4e26fe9946c664c16f22a7c7659b8fda62",
"kind": "table",
"rows": 1,
"schema": "…",
"items": [
{
"metric": "r2",
"value": 0.9946864912749541,
"lower": 0.9925627080187994,
"upper": 0.9968102745311088,
"baseline": -0.026382528195413403,
"baseline_lower": -0.05837933944915031,
"baseline_upper": 0.0056142830583235034,
"difference": 1.0210690194703675,
"t": 85.36813384674491,
"p_value": 1.1286802331086823e-7
}
]
}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.