stats_polynomial-regression
Fit polynomial regression models of specified degree, returning coefficients, R², fitted values, and residuals.
Instructions
Polynomial regression of degree n with goodness-of-fit metrics.
Use when fitting a polynomial of degree n to data. Provide x, y arrays, and degree. Returns: coefficients, R², fitted values, and residuals.
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>"
},
"name": "stats_polynomial-regression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Independent variable array | |
| y | Yes | Dependent variable array | |
| degree | No | Polynomial degree (1=linear, 2=quadratic, etc.) |