Skip to main content
POST
/
quantlib
/
ml
/
credit
/
calibration
Model Probability Calibration
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/ml/credit/calibration \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "y_true": [
    0,
    0,
    1,
    1,
    0,
    1
  ],
  "y_score": [
    0.15,
    0.25,
    0.75,
    0.85,
    0.2,
    0.8
  ],
  "method": "platt"
}
'
{
  "success": true,
  "data": {
    "calibrated_probabilities": [
      0.12,
      0.21,
      0.78,
      0.89,
      0.18,
      0.82
    ],
    "method": "platt"
  }
}

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
y_true
enum<integer>[]
required

True binary labels

Available options:
0,
1
Example:
[0, 0, 1, 1, 0, 1]
y_score
number[]
required

Uncalibrated predicted probabilities

Example:
[0.15, 0.25, 0.75, 0.85, 0.2, 0.8]
method
enum<string>
default:platt

Calibration method

Available options:
platt,
isotonic
Example:

"platt"

Response

Calibrated probabilities

success
boolean
Example:

true

data
object