gradient_descent_steps
Runs batch or stochastic gradient descent steps for linear regression, updating model weights to reduce squared error using input data, learning rate, and step count.
Instructions
Gradient descent on squared error for a linear model. mode: batch | stochastic. weights = [w0, w1, ...].
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": {
"X": "<X>",
"y": "<y>",
"weights": "<weights>"
},
"name": "gradient_descent_steps"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| X | Yes | ||
| y | Yes | ||
| mode | No | batch | |
| alpha | No | ||
| steps | No | ||
| weights | Yes | ||
| fold_two | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |