Skip to main content
POST
/
quantlib
/
physics
/
max-entropy
curl --request POST \ --url https://api.fincept.in/quantlib/physics/max-entropy \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --data ' { "n_states": 5, "constraint_values": [ 0.15, 0.2, 0.3, 0.2, 0.15 ] } '
{
  "success": true,
  "data": {
    "distribution": [
      0.15,
      0.2,
      0.3,
      0.2,
      0.15
    ],
    "n_states": 5
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://api.fincept.in/auth/register

Body

application/json
n_states
integer
required

Number of states in the distribution

Example:

5

constraint_values
number[]
required

Target probabilities for each state (constraints). Each value represents the desired probability for the corresponding state index.

Example:
[0.1, 0.2, 0.3, 0.25, 0.15]

Response

Maximum entropy distribution computed successfully

success
boolean
Example:

true

data
object