Math & Numbers
Fit a binary logistic regression model with gradient descent and predict class probabilities
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/logistic-regression-calculator' \
-H 'Content-Type: application/json' \
-d '{"csvData":"x1,x2,y\n0,1,0\n1,1,0\n1,2,0\n2,2,1\n3,2,1\n3,3,1\n4,3,1","hasHeaderRow":true,"predictionValues":"2.5, 2.5","learningRate":0.2,"iterations":3000,"threshold":0.5,"decimalPlaces":4}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/logistic-regression-calculator| Name | Type | Required | Description |
|---|---|---|---|
| csvData | textarea | No | — |
| hasHeaderRow | checkbox | No | — |
| predictionValues | text | No | — |
| learningRate | number | No | — |
| iterations | number | No | — |
| threshold |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-logistic-regression-calculator": {
"name": "logistic-regression-calculator",
"description": "Fit a binary logistic regression model with gradient descent and predict class probabilities",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=logistic-regression-calculator",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "logistic-regression-calculator",
"arguments": {
"csvData": "x1,x2,y\n0,1,0\n1,1,0\n1,2,0\n2,2,1\n3,2,1\n3,3,1\n4,3,1",
"hasHeaderRow": true,
"predictionValues": "2.5, 2.5",
"learningRate": 0.2,
"iterations": 3000,
"threshold": 0.5,
"decimalPlaces": 4
}
}
}Questions or issues? Contact [email protected]
| number |
| No |
| — |
| decimalPlaces | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}