Get the champion model score code

get/projects/{projectId}/champion/code
Internal-Use Only

Returns the score code for the project champion model in these formats: ds2package, ds2, application/json, raw, and text/plain.

Request Samples

1

Response Samples

1{
2 "body": "*------------------------------------------------------------*;\n* DMCAS Release: 1.0;\n* SAS Release: V.03.04M0P061718;\n* Site Number: 70180938;\n* Host: myserver.com;\n* Encoding: utf-8;\n* Java Encoding: UTF8;\n* Locale: en_US;\n* Project GUID: 9a21d25e-945f-4dae-b20c-0321b8a3b775;\n* Node GUID: 0895f86a-dff5-4b5e-ab40-f7a53f476979;\n* Generated by: sasdemo;\n* Date: 03JUL2018: 12: 33: 18\n*------------------------------------------------------------*;\n*------------------------------------------------------------*;\n*Nodeid: _IARB7QKDFQIUEMKP4IE8SHVD;\n*------------------------------------------------------------*;\n length _strfmt_ $12; drop _strfmt_;\n _strfmt_ = ' ';\n\n array _tlevname_10015615_{\n 2\n} $12 _temporary_ ( ' 1'\n ' 0');\n\n array _dt_fi_10015615_{\n 2\n} _temporary_;\n\n _node_id_ = 0;\n _new_id_ = -1;\n nextnode_10015615:\n if _node_id_ eq 0 then do;\n _strfmt_ = left(trim(put(DELINQ,BEST12.)));\n if _strfmt_ in ('4',\n '1',\n '0',\n '3',\n '2',\n '.') then do;\n\n _new_id_ = 1;\n end;\n else if _strfmt_ in ('10',\n '5',\n '7',\n '6',\n '8') then do;\n\n _new_id_ = 2;\n end;\n else do;\n _new_id_ = 1;\n end;\n end;\n else if _node_id_ eq 1 then do;\n _numval_ = DEBTINC;\n if missing(_numval_) then do;\n _node_id_ = 3;\n goto nextnode_10015615;\n end;\n if (_numval_ ge 43.5520309368842 and _numval_ lt 143.949604953611) then do;\n\n _new_id_ = 3;\n end;\n else if (_numval_ ge 0.52449921542988 and _numval_ lt 43.5520309368842) then do;\n\n _new_id_ = 4;\n end;\n else if (_numval_ lt 0.52449921542988) then do;\n _new_id_ = 4;\n end;\n else if (_numval_ ge 143.949604953611) then do;\n _new_id_ = 3;\n end;\n else do;\n _new_id_ = 4;\n end;\n end;\n else if _node_id_ eq 2 then do;\n _leaf_id_ = 2;\n _new_id_ = -1;\n _dt_pred_lev_ = 0;\n _dt_pred_prob_ = 1;\n _dt_fi_10015615_{\n 1\n} = 1;\n _dt_fi_10015615_{\n 2\n} = 0;\n end;\n else if _node_id_ eq 3 then do;\n _strfmt_ = left(trim(put(DEROG,BEST12.)));\n if _strfmt_ in ('1',\n '0',\n '2',\n '.') then do;\n\n _new_id_ = 5;\n end;\n else if _strfmt_ in ('4',\n '7',\n '6',\n '3') then do;\n\n _new_id_ = 6;\n end;\n else do;\n _new_id_ = 5;\n end;\n end;\n else if _node_id_ eq 4 then do;\n _numval_ = VALUE;\n if missing(_numval_) then do;\n _node_id_ = 7;\n goto nextnode_10015615;\n end;\n if (_numval_ ge 474844.95 and _numval_ lt 855909) then do;\n\n _new_id_ = 7;\n end;\n else if (_numval_ ge 9100 and _numval_ lt 474844.95) then do;\n\n _new_id_ = 8;\n end;\n else if (_numval_ lt 9100) then do;\n _new_id_ = 8;\n end;\n else if (_numval_ ge 855909) then do;\n _new_id_ = 7;\n end;\n else do;\n _new_id_ = 8;\n end;\n end;\n else if _node_id_ eq 5 then do;\n _numval_ = VALUE;\n if missing(_numval_) then do;\n _node_id_ = 9;\n goto nextnode_10015615;\n end;\n if (_numval_ ge 474844.95 and _numval_ lt 855909) then do;\n\n _new_id_ = 9;\n end;\n else if (_numval_ ge 9100 and _numval_ lt 474844.95) then do;\n\n _new_id_ = 10;\n end;\n else if (_numval_ lt 9100) then do;\n _new_id_ = 10;\n end;\n else if (_numval_ ge 855909) then do;\n _new_id_ = 9;\n end;\n else do;\n _new_id_ = 10;\n end;\n end;\n else if _node_id_ eq 6 then do;\n _leaf_id_ = 6;\n _new_id_ = -1;\n _dt_pred_lev_ = 0;\n _dt_pred_prob_ = 1;\n _dt_fi_10015615_{\n 1\n} = 1;\n _dt_fi_10015615_{\n 2\n} = 0;\n end;\n else if _node_id_ eq 7 then do;\n _leaf_id_ = 7;\n _new_id_ = -1;\n _dt_pred_lev_ = 0;\n _dt_pred_prob_ = 0.72727272727272;\n _dt_fi_10015615_{\n 1\n} = 0.72727272727272;\n _dt_fi_10015615_{\n 2\n} = 0.27272727272727;\n end;\n else if _node_id_ eq 8 then do;\n _leaf_id_ = 8;\n _new_id_ = -1;\n _dt_pred_lev_ = 1;\n _dt_pred_prob_ = 0.94372693726937;\n _dt_fi_10015615_{\n 1\n} = 0.05627306273062;\n _dt_fi_10015615_{\n 2\n} = 0.94372693726937;\n end;\n else if _node_id_ eq 9 then do;\n _leaf_id_ = 9;\n _new_id_ = -1;\n _dt_pred_lev_ = 0;\n _dt_pred_prob_ = 1;\n _dt_fi_10015615_{\n 1\n} = 1;\n _dt_fi_10015615_{\n 2\n} = 0;\n end;\n else if _node_id_ eq 10 then do;\n _numval_ = DEBTINC;\n if missing(_numval_) then do;\n _node_id_ = 12;\n goto nextnode_10015615;\n end;\n if (_numval_ ge 50.7232862237933 and _numval_ lt 143.949604953611) then do;\n\n _new_id_ = 11;\n end;\n else if (_numval_ ge 0.52449921542988 and _numval_ lt 50.7232862237933) then do;\n\n _new_id_ = 12;\n end;\n else if (_numval_ lt 0.52449921542988) then do;\n _new_id_ = 12;\n end;\n else if (_numval_ ge 143.949604953611) then do;\n _new_id_ = 11;\n end;\n else do;\n _new_id_ = 12;\n end;\n end;\n else if _node_id_ eq 11 then do;\n _leaf_id_ = 11;\n _new_id_ = -1;\n _dt_pred_lev_ = 0;\n _dt_pred_prob_ = 1;\n _dt_fi_10015615_{\n 1\n} = 1;\n _dt_fi_10015615_{\n 2\n} = 0;\n end;\n else if _node_id_ eq 12 then do;\n _strfmt_ = left(trim(put(DELINQ,BEST12.)));\n if _strfmt_ in ('1',\n '0',\n '3',\n '2',\n '.') then do;\n\n _new_id_ = 13;\n end;\n else if _strfmt_ in ('4') then do;\n\n _new_id_ = 14;\n end;\n else do;\n _new_id_ = 13;\n end;\n end;\n else if _node_id_ eq 13 then do;\n _strfmt_ = left(trim(put(DELINQ,BEST12.)));\n if _strfmt_ in ('1',\n '0',\n '2',\n '.') then do;\n\n _new_id_ = 15;\n end;\n else if _strfmt_ in ('3') then do;\n\n _new_id_ = 16;\n end;\n else do;\n _new_id_ = 15;\n end;\n end;\n else if _node_id_ eq 14 then do;\n _leaf_id_ = 14;\n _new_id_ = -1;\n _dt_pred_lev_ = 0;\n _dt_pred_prob_ = 1;\n _dt_fi_10015615_{\n 1\n} = 1;\n _dt_fi_10015615_{\n 2\n} = 0;\n end;\n else if _node_id_ eq 15 then do;\n _numval_ = CLAGE;\n if missing(_numval_) then do;\n _node_id_ = 18;\n goto nextnode_10015615;\n end;\n if (_numval_ ge 175.235034141696 and _numval_ lt 1168.23356094464) then do;\n\n _new_id_ = 17;\n end;\n else if (_numval_ ge 0 and _numval_ lt 175.235034141696) then do;\n\n _new_id_ = 18;\n end;\n else if (_numval_ lt 0) then do;\n _new_id_ = 18;\n end;\n else if (_numval_ ge 1168.23356094464) then do;\n _new_id_ = 17;\n end;\n else do;\n _new_id_ = 18;\n end;\n end;\n else if _node_id_ eq 16 then do;\n _leaf_id_ = 16;\n _new_id_ = -1;\n _dt_pred_lev_ = 0;\n _dt_pred_prob_ = 0.93333333333333;\n _dt_fi_10015615_{\n 1\n} = 0.93333333333333;\n _dt_fi_10015615_{\n 2\n} = 0.06666666666666;\n end;\n else if _node_id_ eq 17 then do;\n _leaf_id_ = 17;\n _new_id_ = -1;\n _dt_pred_lev_ = 1;\n _dt_pred_prob_ = 0.67;\n _dt_fi_10015615_{\n 1\n} = 0.33;\n _dt_fi_10015615_{\n 2\n} = 0.67;\n end;\n else if _node_id_ eq 18 then do;\n _leaf_id_ = 18;\n _new_id_ = -1;\n _dt_pred_lev_ = 0;\n _dt_pred_prob_ = 0.68181818181818;\n _dt_fi_10015615_{\n 1\n} = 0.68181818181818;\n _dt_fi_10015615_{\n 2\n} = 0.31818181818181;\n end;\n if _new_id_ >= 0 then do;\n _node_id_ = _new_id_;\n goto nextnode_10015615;\n end;\n\n I_BAD = _tlevname_10015615_{_dt_pred_lev_+1\n};\n _i_ = 1;\n _dt_predp_ = _dt_fi_10015615_{_i_\n};\n P_BAD1 = _dt_predp_;\n _i_+1;\n _dt_predp_ = _dt_fi_10015615_{_i_\n};\n P_BAD0 = _dt_predp_;\n _i_+1;\n drop _dt_predp_;\n drop _i_;\n drop _dt_pred_lev_;\n drop _dt_pred_prob_;\n drop _numval_;\n drop _node_id_;\n drop _new_id_;\n\n\n\n *------------------------------------------------------------*;\n * Initializing missing posterior and classification variables ;\n *------------------------------------------------------------*;\n if \"P_BAD0\"n = . then \"P_BAD0\"n =0.8000839983;\n if \"P_BAD1\"n = . then \"P_BAD1\"n =0.1999160017;\n if missing('I_BAD'n) then do;\n drop _P_;\n _P_= 0.0 ;\n if 'P_BAD1'n > _P_ then do;\n _P_ = 'P_BAD1'n;\n 'I_BAD'n = '1';\n end;\n if 'P_BAD0'n > _P_ then do;\n _P_ = 'P_BAD0'n;\n 'I_BAD'n = '0';\n end;\n end;\n*------------------------------------------------------------*;\n* Generating fixed output names;\n*------------------------------------------------------------*;\nLength EM_EVENTPROBABILITY 8;\nLABEL EM_EVENTPROBABILITY = \"Predicted for BAD =1\";\nEM_EVENTPROBABILITY ='P_BAD1'n;\nLENGTH EM_CLASSIFICATION $32;\nLABEL EM_CLASSIFICATION= \"Predicted for BAD\";\nEM_CLASSIFICATION ='I_BAD'n;\nLength EM_PROBABILITY 8;\nLABEL EM_PROBABILITY = \"Probability of Classification\";\nEM_PROBABILITY = max('P_BAD1'n,'P_BAD0'n);\n"
3}

Path Parameters

NameTypeRequiredDescription
projectId
string
true

The unique identifier for the project.

Responses

StatusMeaningDescription
200OKThe request succeeded. The champion model score code was returned.HeadersSchema
400Bad RequestThe request was invalid.Schema
404Not FoundNo model score code exists at the requested path.Schema