post https://api-lib.bambu.life/api/autoMl/v2/prediction
This endpoint allows user to input one or more customer data to predict what kinds of goals he/she might have.
-
Input: a customer's personal information and investment data
-
output: probabilities of goals that customer might have
Request Body
Name | Datatype | Description | Mandatory | Sample values | List of possible values | Notes |
---|---|---|---|---|---|---|
clientId | String | It is meant for identification purpose as information are stored under unique id value | Yes | |||
model | String | Choose a trained model to be used to make a prediction based on customer data | Yes | "ensemble" | “manual_selection”, "ensemble", “mlp” | |
customer | Array of Dictionary | Array containing each customer’s information. The fields are different per project, based on what we’re getting from the client’s DB. | The array is mandatory and cannot be empty array. For each customer’s information in the dictionary, the only mandatory field is customerID | "customer": [ { "nationality": "Indian", "gender": "male", "age": 50, "race": "Canadian", "personalIncome": 8806, "savingsRatio": 0.4, "platformCountry": "IN", "customerId": "273a3980-2458-11e9-b0a0-9d372de0f001_1" }, { "nationality": "Chinese", "gender": "female", "age": 50, "race": "Canadian", "personalIncome": 6806, "savingsRatio": 0.32, "platformCountry": "SG", "customerId": "273a3980-2458-11e9-b0a0-9d372d01_1" } ] | The set of key-value pair dictionary in the array object always changes. And the input validation of the set of key-value pair is defined and set by the customer |
Response Body
Name | Datatype | Description | Sample value | No. of decimals | Notes |
---|---|---|---|---|---|
customerId | String | It is meant for identification purpose as information are stored under unique id value | “0” | ||
goalRecommendation | Array | Array of goalType and respective predictedProb. | [ { "customerId": "0", "goalRecommendation": [ { "goalType": "retirement", "predictedProb": 0.44828 }, ... { "goalType": "financialSecurity", "predictedProb": 0 }, { "goalType": "business", "predictedProb": 0 } ] }, { "customerId": "1", "goalRecommendation": [ { "goalType": "retirement", "predictedProb": 0.85484 }, ... { "goalType": "business", "predictedProb": 0 } ] } ] | ||
goalType | String | It describes the name of particular goalType | “retirement” | ||
predictedProb | Number | It describes the probability of to get that goalType based on customer information | 5 |