knn_classify
Classify a query point using labeled numeric training rows with k-nearest-neighbour voting; optionally apply min-max normalisation and select a distance metric.
Instructions
k-nearest-neighbour classification. train rows: [a1, ..., an, label]. Optional min-max normalisation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"train": "<train>",
"query": "<query>"
},
"name": "knn_classify"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| query | Yes | ||
| train | Yes | ||
| metric | No | euclidean | |
| normalise | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |