Fit a binary logistic regression
statistics_logistic-regressionBinary logistic regression by iteratively reweighted least squares with odds ratios and intervals, deviance, AIC, Hosmer-Lemeshow goodness of fit, a confusion matrix at a chosen threshold and complete-separation detection. Price $0.05 USDC. POST /api/v1/statistics/logistic-regression. An unpaid call returns the x402 payment terms and does not run.
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": {
"y": "<y>",
"X": "<X>"
},
"name": "statistics_logistic-regression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| X | Yes | X, array. Required. | |
| y | Yes | y, array. Required. | |
| names | No | names, array. Optional. | |
| hlGroups | No | hlGroups, integer, from 3 to 50. Required. | |
| threshold | No | threshold, number. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | n. Number. | |
| aic | No | aic. Number. | |
| sources | No | sources. Array. | |
| deviance | No | deviance. Number. | |
| confusion | No | confusion. Object. | |
| converged | No | converged. Boolean. | |
| iterations | No | iterations. Number. | |
| droppedRows | No | droppedRows. Number. | |
| limitations | No | limitations. Array. | |
| coefficients | No | coefficients. Array. | |
| nullDeviance | No | nullDeviance. Number. | |
| hosmerLemeshow | No | hosmerLemeshow. Object. |