The following is a brief layout of the nightowl API and future plan.
The easiest way to deploy would be:
The whole API will ultimately move to accept integer fields only instead of current string fields, including
## API server
http://3.133.193.34/api/nightowl_ver2
## Training server
http://3.137.34.107/api/nightowl_ver2
{
"lead": {
"id": 10190375237756,
"date_weekday": "2",
"date_h": "16",
"dups_short": 0,
"dups_long": 130,
"dups_long_90": 130,
"body_loanAmount_min": 100,
"body_dob_year": 1986,
"body_monthsAtBank": 12,
"body_monthsAtAddress": 42,
"body_monthsEmployed": 42,
"body_monthlyIncome": 3300,
"body_employmentType": "employed",
"useragent_ismobile": "0",
"type": 2,
"body_domain": "yahoo.com",
"body_bankRoutingNumber": 73972181,
"body_state": "TX",
"campaign": 321098,
"body_homeOwnership": "rent",
"useragent_parent": "DefaultProperties",
"webmaster": 65230,
"subid1": 0,
"body_payType": "direct_deposit",
"subaccount": 1022941746942,
"body_payFrequency": "biweekly",
"useragent_platform": "unknown",
"body_military": 0,
"body_zip": 77418,
"useragent_browser": "Default Browser",
"body_creditScore": "poor",
"body_loanPurpose": "major"
}
}
Server: nginx/1.12.2
Date: Tue, 09 Apr 2020 23:13:05 GMT
Content-Type: application/json
Content-Length: 134
Connection: keep-alive
{
'clf_model': 'tenth_goodleads.cbm',
'idno': 77683028,
'lead_value': -1.5060571453728926,
'prob': 0.07385023755112542,
'regr_MAE': 10.35,
'regr_model': 'regr_40_wo_lender_depth6_rmse.cbm',
'response_time': 0.017893166999860114
}
Field Name | Fied Type | Description |
---|---|---|
clf_model | String | Name of the classifier: data size, depth, fields, ... |
idno | Integer | the lead ID as posted for cross check |
lead_value | Float | The predicted value from historical regression |
prob | Float | The predicted probability of lead value larger than USD 6 |
regr_MAE | Float | The Mean Absolute Error of the regressor |
regr_model | String | The name of regression model: data size, attributes, ... |
response_time | Float | The time cost of the predition |