Skip to content

Oms API GET Run Output Table csv compare runs

amc1999 edited this page Mar 14, 2024 · 4 revisions

Compare model runs and return results as csv file.

Compare [base] and [variant] model runs output values for each expression and get it as response stream UTF-8 outputTable.csv file attachment, optionally starts with byte order mark (BOM).

Comparison can be calculated as one of the following:

  • for each table expression use one of: diff, ratio or percent comparison between [base] and [variant] model runs.
  • use comma separated list of comparison expressions between [base] and [variant] or simple expression for each run.

Dimension(s) returned as enum codes.

Methods:

GET /api/model/:model/run/:run/table/:name/compare/:compare/variant/:variant/csv
GET /api/model/:model/run/:run/table/:name/compare/:compare/variant/:variant/csv-bom

Arguments:

:model - (required) model digest or model name

Model can be identified by digest or by model name. It is recommended to use digest because it is uniquely identifies model. It is possible to use model name, which is more human readable than digest, but if there are multiple models with same name in database than result is undefined.

:run     - (required) base model run digest, run stamp or run name
:variant - (required) variant model run(s): comma-separated list of digests, run stamps or run names

Model run can be identified by run digest, run stamp or run name. It is recommended to use digest because it is uniquely identifies model run. Run stamp, if not explicitly specified as model run option, automatically generated as timestamp string, ex.: 2016_08_17_21_07_55_123. It is also possible to use name, which is more human readable than digest, but if there are multiple runs with same name in database than result is undefined.

:name - (required) output table name
:compare - (required) comparison to calculate
  • diff differenece of values between variant and base run, e.g.: Expr0[variant] - Expr0[base]
  • ratio ratio of values between variant and base run, e.g.: Expr0[variant] / Expr0[base]
  • percent proportional difference multipled by 100, e.g.: 100 * (Expr0[variant] - Expr0[base]) / Expr0[base]

Or a list of comma-separated expressions, for example: expr0, expr1[variant] + expr2[base]

It is also possible to use parameter(s) in calculation, parameter must be a scalar of float or integer type. For example: (Expr1[variant] - Expr1[base]) * param.Scale[base], where param.Scale is a value of scalar parameter Scale in [base] model run.

Call examples:

http://localhost:4040/api/model/modelOne/run/Default/table/salarySex/compare/diff/variant/Default-4/csv
http://localhost:4040/api/model/modelOne/run/Default/table/salarySex/compare/ratio/variant/Default-4/csv
http://localhost:4040/api/model/modelOne/run/Default/table/salarySex/compare/percent/variant/Default-4/csv

http://localhost:4040/api/model/modelOne/run/Default/table/salarySex/compare/diff/variant/Default-4/csv-bom

http://localhost:4040/api/model/modelOne/run/Default/table/salarySex/compare/expr0,expr1,expr2/variant/Default-4/csv
http://localhost:4040/api/model/modelOne/run/Default/table/salarySex/compare/expr0%2Cexpr1%5Bvariant%5D%2Bexpr2%5Bbase%5D/variant/Default-4/csv

Note: above expr0%2Cexpr1%5Bvariant%5D%2Bexpr2%5Bbase%5D is URL encoded: expr0,expr1[variant]+expr2[base].

Example:

curl http://localhost:4040/api/model/modelOne/run/Default/table/salarySex/compare/ratio/variant/Default-4,Sub-values_4/csv
run_digest,calc_name,dim0,dim1,calc_value
ca663651953bae94d0afdf71edba4c91,expr0,L,M,50
ca663651953bae94d0afdf71edba4c91,expr0,L,F,60
ca663651953bae94d0afdf71edba4c91,expr0,L,all,1
ca663651953bae94d0afdf71edba4c91,expr0,M,M,51.6
ca663651953bae94d0afdf71edba4c91,expr0,M,F,62
ca663651953bae94d0afdf71edba4c91,expr0,M,all,2
ca663651953bae94d0afdf71edba4c91,expr0,H,M,53.2
ca663651953bae94d0afdf71edba4c91,expr0,H,F,64
ca663651953bae94d0afdf71edba4c91,expr0,H,all,3
ca663651953bae94d0afdf71edba4c91,expr1,L,M,0
ca663651953bae94d0afdf71edba4c91,expr1,L,F,1
ca663651953bae94d0afdf71edba4c91,expr1,L,all,800
ca663651953bae94d0afdf71edba4c91,expr1,M,M,1
ca663651953bae94d0afdf71edba4c91,expr1,M,F,2
ca663651953bae94d0afdf71edba4c91,expr1,M,all,801
ca663651953bae94d0afdf71edba4c91,expr1,H,M,2
ca663651953bae94d0afdf71edba4c91,expr1,H,F,3
ca663651953bae94d0afdf71edba4c91,expr1,H,all,802
ca663651953bae94d0afdf71edba4c91,expr2,L,M,50
ca663651953bae94d0afdf71edba4c91,expr2,L,F,61
ca663651953bae94d0afdf71edba4c91,expr2,L,all,801
ca663651953bae94d0afdf71edba4c91,expr2,M,M,52.6
ca663651953bae94d0afdf71edba4c91,expr2,M,F,64
ca663651953bae94d0afdf71edba4c91,expr2,M,all,803
ca663651953bae94d0afdf71edba4c91,expr2,H,M,55.2
ca663651953bae94d0afdf71edba4c91,expr2,H,F,67
ca663651953bae94d0afdf71edba4c91,expr2,H,all,805
ca663651953bae94d0afdf71edba4c91,expr3,L,M,0
ca663651953bae94d0afdf71edba4c91,expr3,L,F,60
ca663651953bae94d0afdf71edba4c91,expr3,L,all,800
ca663651953bae94d0afdf71edba4c91,expr3,M,M,51.6
ca663651953bae94d0afdf71edba4c91,expr3,M,F,124
ca663651953bae94d0afdf71edba4c91,expr3,M,all,1602
ca663651953bae94d0afdf71edba4c91,expr3,H,M,106.4
ca663651953bae94d0afdf71edba4c91,expr3,H,F,192
ca663651953bae94d0afdf71edba4c91,expr3,H,all,2406
c519fc5869f244ac4c80ae44695a4272,expr0,L,M,50
c519fc5869f244ac4c80ae44695a4272,expr0,L,F,60
c519fc5869f244ac4c80ae44695a4272,expr0,L,all,1201
c519fc5869f244ac4c80ae44695a4272,expr0,M,M,51.6
c519fc5869f244ac4c80ae44695a4272,expr0,M,F,62
c519fc5869f244ac4c80ae44695a4272,expr0,M,all,1202
c519fc5869f244ac4c80ae44695a4272,expr0,H,M,53.2
c519fc5869f244ac4c80ae44695a4272,expr0,H,F,64
c519fc5869f244ac4c80ae44695a4272,expr0,H,all,1203
c519fc5869f244ac4c80ae44695a4272,expr1,L,M,6
c519fc5869f244ac4c80ae44695a4272,expr1,L,F,10
c519fc5869f244ac4c80ae44695a4272,expr1,L,all,3206
c519fc5869f244ac4c80ae44695a4272,expr1,M,M,10
c519fc5869f244ac4c80ae44695a4272,expr1,M,F,14
c519fc5869f244ac4c80ae44695a4272,expr1,M,all,3210
c519fc5869f244ac4c80ae44695a4272,expr1,H,M,14
c519fc5869f244ac4c80ae44695a4272,expr1,H,F,18
c519fc5869f244ac4c80ae44695a4272,expr1,H,all,3214
c519fc5869f244ac4c80ae44695a4272,expr2,L,M,51.5
c519fc5869f244ac4c80ae44695a4272,expr2,L,F,62.5
c519fc5869f244ac4c80ae44695a4272,expr2,L,all,2002.5
c519fc5869f244ac4c80ae44695a4272,expr2,M,M,54.1
c519fc5869f244ac4c80ae44695a4272,expr2,M,F,65.5
c519fc5869f244ac4c80ae44695a4272,expr2,M,all,2004.5
c519fc5869f244ac4c80ae44695a4272,expr2,H,M,56.7
c519fc5869f244ac4c80ae44695a4272,expr2,H,F,68.5
c519fc5869f244ac4c80ae44695a4272,expr2,H,all,2006.5
c519fc5869f244ac4c80ae44695a4272,expr3,L,M,75
c519fc5869f244ac4c80ae44695a4272,expr3,L,F,150
c519fc5869f244ac4c80ae44695a4272,expr3,L,all,963601.5
c519fc5869f244ac4c80ae44695a4272,expr3,M,M,129
c519fc5869f244ac4c80ae44695a4272,expr3,M,F,217
c519fc5869f244ac4c80ae44695a4272,expr3,M,all,965605
c519fc5869f244ac4c80ae44695a4272,expr3,H,M,186.2
c519fc5869f244ac4c80ae44695a4272,expr3,H,F,288
c519fc5869f244ac4c80ae44695a4272,expr3,H,all,967610.5
c519fc5869f244ac4c80ae44695a4272,ratio_expr0,L,M,1
c519fc5869f244ac4c80ae44695a4272,ratio_expr0,L,F,1
c519fc5869f244ac4c80ae44695a4272,ratio_expr0,L,all,1201
c519fc5869f244ac4c80ae44695a4272,ratio_expr0,M,M,1
c519fc5869f244ac4c80ae44695a4272,ratio_expr0,M,F,1
c519fc5869f244ac4c80ae44695a4272,ratio_expr0,M,all,601
c519fc5869f244ac4c80ae44695a4272,ratio_expr0,H,M,1
c519fc5869f244ac4c80ae44695a4272,ratio_expr0,H,F,1
c519fc5869f244ac4c80ae44695a4272,ratio_expr0,H,all,401
c519fc5869f244ac4c80ae44695a4272,ratio_expr1,L,M,null
c519fc5869f244ac4c80ae44695a4272,ratio_expr1,L,F,10
c519fc5869f244ac4c80ae44695a4272,ratio_expr1,L,all,4.0075
c519fc5869f244ac4c80ae44695a4272,ratio_expr1,M,M,10
c519fc5869f244ac4c80ae44695a4272,ratio_expr1,M,F,7
c519fc5869f244ac4c80ae44695a4272,ratio_expr1,M,all,4.00749063670412
c519fc5869f244ac4c80ae44695a4272,ratio_expr1,H,M,7
c519fc5869f244ac4c80ae44695a4272,ratio_expr1,H,F,6
c519fc5869f244ac4c80ae44695a4272,ratio_expr1,H,all,4.0074812967581
c519fc5869f244ac4c80ae44695a4272,ratio_expr2,L,M,1.03
c519fc5869f244ac4c80ae44695a4272,ratio_expr2,L,F,1.02459016393443
c519fc5869f244ac4c80ae44695a4272,ratio_expr2,L,all,2.5
c519fc5869f244ac4c80ae44695a4272,ratio_expr2,M,M,1.02851711026616
c519fc5869f244ac4c80ae44695a4272,ratio_expr2,M,F,1.0234375
c519fc5869f244ac4c80ae44695a4272,ratio_expr2,M,all,2.49626400996264
c519fc5869f244ac4c80ae44695a4272,ratio_expr2,H,M,1.02717391304348
c519fc5869f244ac4c80ae44695a4272,ratio_expr2,H,F,1.02238805970149
c519fc5869f244ac4c80ae44695a4272,ratio_expr2,H,all,2.49254658385093
c519fc5869f244ac4c80ae44695a4272,ratio_expr3,L,M,null
c519fc5869f244ac4c80ae44695a4272,ratio_expr3,L,F,2.5
c519fc5869f244ac4c80ae44695a4272,ratio_expr3,L,all,1204.501875
c519fc5869f244ac4c80ae44695a4272,ratio_expr3,M,M,2.5
c519fc5869f244ac4c80ae44695a4272,ratio_expr3,M,F,1.75
c519fc5869f244ac4c80ae44695a4272,ratio_expr3,M,all,602.749687890137
c519fc5869f244ac4c80ae44695a4272,ratio_expr3,H,M,1.75
c519fc5869f244ac4c80ae44695a4272,ratio_expr3,H,F,1.5
c519fc5869f244ac4c80ae44695a4272,ratio_expr3,H,all,402.165627597672
ffad6e8ed4449dafe11b82c7aea82f74,expr0,L,M,50
ffad6e8ed4449dafe11b82c7aea82f74,expr0,L,F,60
ffad6e8ed4449dafe11b82c7aea82f74,expr0,L,all,1201
ffad6e8ed4449dafe11b82c7aea82f74,expr0,M,M,51.6
ffad6e8ed4449dafe11b82c7aea82f74,expr0,M,F,62
ffad6e8ed4449dafe11b82c7aea82f74,expr0,M,all,1202
ffad6e8ed4449dafe11b82c7aea82f74,expr0,H,M,53.2
ffad6e8ed4449dafe11b82c7aea82f74,expr0,H,F,64
ffad6e8ed4449dafe11b82c7aea82f74,expr0,H,all,1203
ffad6e8ed4449dafe11b82c7aea82f74,expr1,L,M,6
ffad6e8ed4449dafe11b82c7aea82f74,expr1,L,F,10
ffad6e8ed4449dafe11b82c7aea82f74,expr1,L,all,3206
ffad6e8ed4449dafe11b82c7aea82f74,expr1,M,M,10
ffad6e8ed4449dafe11b82c7aea82f74,expr1,M,F,14
ffad6e8ed4449dafe11b82c7aea82f74,expr1,M,all,3210
ffad6e8ed4449dafe11b82c7aea82f74,expr1,H,M,14
ffad6e8ed4449dafe11b82c7aea82f74,expr1,H,F,18
ffad6e8ed4449dafe11b82c7aea82f74,expr1,H,all,3214
ffad6e8ed4449dafe11b82c7aea82f74,expr2,L,M,51.5
ffad6e8ed4449dafe11b82c7aea82f74,expr2,L,F,62.5
ffad6e8ed4449dafe11b82c7aea82f74,expr2,L,all,2002.5
ffad6e8ed4449dafe11b82c7aea82f74,expr2,M,M,54.1
ffad6e8ed4449dafe11b82c7aea82f74,expr2,M,F,65.5
ffad6e8ed4449dafe11b82c7aea82f74,expr2,M,all,2004.5
ffad6e8ed4449dafe11b82c7aea82f74,expr2,H,M,56.7
ffad6e8ed4449dafe11b82c7aea82f74,expr2,H,F,68.5
ffad6e8ed4449dafe11b82c7aea82f74,expr2,H,all,2006.5
ffad6e8ed4449dafe11b82c7aea82f74,expr3,L,M,75
ffad6e8ed4449dafe11b82c7aea82f74,expr3,L,F,150
ffad6e8ed4449dafe11b82c7aea82f74,expr3,L,all,963601.5
ffad6e8ed4449dafe11b82c7aea82f74,expr3,M,M,129
ffad6e8ed4449dafe11b82c7aea82f74,expr3,M,F,217
ffad6e8ed4449dafe11b82c7aea82f74,expr3,M,all,965605
ffad6e8ed4449dafe11b82c7aea82f74,expr3,H,M,186.2
ffad6e8ed4449dafe11b82c7aea82f74,expr3,H,F,288
ffad6e8ed4449dafe11b82c7aea82f74,expr3,H,all,967610.5
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr0,L,M,1
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr0,L,F,1
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr0,L,all,1201
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr0,M,M,1
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr0,M,F,1
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr0,M,all,601
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr0,H,M,1
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr0,H,F,1
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr0,H,all,401
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr1,L,M,null
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr1,L,F,10
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr1,L,all,4.0075
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr1,M,M,10
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr1,M,F,7
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr1,M,all,4.00749063670412
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr1,H,M,7
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr1,H,F,6
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr1,H,all,4.0074812967581
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr2,L,M,1.03
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr2,L,F,1.02459016393443
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr2,L,all,2.5
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr2,M,M,1.02851711026616
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr2,M,F,1.0234375
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr2,M,all,2.49626400996264
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr2,H,M,1.02717391304348
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr2,H,F,1.02238805970149
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr2,H,all,2.49254658385093
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr3,L,M,null
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr3,L,F,2.5
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr3,L,all,1204.501875
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr3,M,M,2.5
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr3,M,F,1.75
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr3,M,all,602.749687890137
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr3,H,M,1.75
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr3,H,F,1.5
ffad6e8ed4449dafe11b82c7aea82f74,ratio_expr3,H,all,402.165627597672

Home

Getting Started

Model development in OpenM++

Using OpenM++

Model Development Topics

OpenM++ web-service: API and cloud setup

Using OpenM++ from Python and R

Docker

OpenM++ Development

OpenM++ Design, Roadmap and Status

OpenM++ web-service API

GET Model Metadata

GET Model Extras

GET Model Run results metadata

GET Model Workset metadata: set of input parameters

Read Parameters, Output Tables or Microdata values

GET Parameters, Output Tables or Microdata values

GET Parameters, Output Tables or Microdata as CSV

GET Modeling Task metadata and task run history

Update Model Profile: set of key-value options

Update Model Workset: set of input parameters

Update Model Runs

Update Modeling Tasks

Run Models: run models and monitor progress

Download model, model run results or input parameters

Upload model runs or worksets (input scenarios)

Download and upload user files

User: manage user settings

Model run jobs and service state

Administrative: manage web-service state

Clone this wiki locally