Skip to main content
POST
/
quantlib
/
ml
/
credit
/
logistic-regression
Logistic Regression for Credit Scoring
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/ml/credit/logistic-regression \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "X": [
    [
      1.2,
      0.5,
      3.1
    ],
    [
      2.1,
      1.3,
      2.5
    ],
    [
      0.8,
      0.9,
      4.2
    ]
  ],
  "y": [
    0,
    1,
    0
  ],
  "predict_X": [
    [
      1.5,
      0.7,
      3.3
    ]
  ]
}
'
{
  "success": true,
  "data": {
    "coefficients": [
      0.342,
      -0.156,
      0.871
    ],
    "intercept": -1.234,
    "aic": 145.67,
    "bic": 152.89,
    "predictions": [
      0.234
    ]
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register

Body

application/json
X
number[][]
required

Feature matrix (training data). Each row is a sample, each column is a feature.

Example:
[
[1.2, 0.5, 3.1],
[2.1, 1.3, 2.5],
[0.8, 0.9, 4.2]
]
y
enum<integer>[]
required

Binary target labels (0 = non-default, 1 = default)

Available options:
0,
1
Example:
[0, 1, 0]
predict_X
number[][]

Optional feature matrix for prediction

Example:
[[1.5, 0.7, 3.3]]

Response

Logistic regression results

success
boolean
Example:

true

data
object