Last updated on 16th July 2024
Creates and runs a model sampler simulation and returns the object with its various attributes.
Example request body
curl -X POST \
http://localhost:8080/api/simulations/model-sampler \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"modelName": "Simple Credit Card",
"outputPath":"/tmp/sampler",
"modelSampler": {
"dimensions": {
"interest":[0.01,0.02,0.03],
"spending":{
"min":100,
"max":500
}
},
"seeds":[123456, 987645],
"nbSamples":3,
"nbTicks":5
}
}'
Parameter | Type | Required | Description |
---|---|---|---|
modelName | string | true | Name of model to run a model sampler for |
outputPath | String | true | Where to output the model sampler data. |
modelSampler | object | true | Parameters of the model sampler |
>dimensions | object | true | The dimensions that will be used for parameters sampling. The name should correspond the model inner parameters. |
>seeds | array | The seeds used for the runs. The size of the array determine the number of runs. | |
>mcCount | Integer | The number of Monte-Carlo run per sample. | |
>nbTicks | Integer | true | How long to run each simulation of the model sampler for |
>nbSamples | Long | true | The number of samples to create from the dimensions values. |
Example request body with inline definition for the model sampler
{
"modelName": "Simple Credit Card",
"outputPath":"/tmp/sampler",
"modelSampler": {
"dimensions": {
"interest":[0.01,0.02,0.03],
"spending":{
"min":100,
"max":500
}
},
"seeds":[123456, 987645],
"nbSamples":3,
"nbTicks":5
}
}
Example of a request body with model sampler definition from input
{
"modelName": "Simple Credit Card",
"outputPath":"/tmp/sampler",
"modelSampler": "path/to/input.json"
}
The content of input.json
should be the same as the one given in the inline definition.
The input for a dimension can either be: