Curve-fit experimental data
fit_correlationFit linear or power-law models to paired experimental data, returning coefficients, R², and formula string for engineering correlations.
Instructions
Fit a least-squares model to paired (x, y) experimental data and return the coefficients, R^2, and a formula string. Use 'power' for dimensionless correlations like Nu = CRe^n (fit in log-log space; x and y must be positive) or 'linear' for y = mx + c.
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": {
"model": "<model>",
"x": "<x>",
"y": "<y>"
},
"name": "fit_correlation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Independent-variable values. | |
| y | Yes | Dependent-variable values (same length as x). | |
| model | Yes | Which model to fit. |