This application demonstrates:
- Sending Online Prediction (or Inference) request to the REST API endpoint of a trained model hosted on GCP ML Engine; see model details below; Note; the income prediction is based on two scenarios only: income >50k; or income <= 50k.
- Using Google API Javascript Client Libraries to make the request from the browser.
- OAuth 2.0 authorization is needed to access the REST API, using Google Id. Click Signin for Authorization before making prediction.
- Changing the "capital_loss" parameter can greatly effect the predicted income; therefore we make this parameter adjustable for demo purpose. All other parameters are predefined and locked down as shown below, to simplify the scope.
The trained Machine Learning model is for predicting Income based on the demographic input data, as used in the 1994 Census database. An example of the input data is shown below. The model was trained and deployed on the GCP ML Engine, as described in the Google Cloud - Getting Started tutorial . No effort has been spent in tuning the model; leaving it for future exercise.
Please Signin
Demographic | |
---|---|
age | 25 |
workclass | Private |
education | 11th |
education_num | 7 |
Marital_status | Never-married |
occupation | Machine-op-inspct |
relationship | Own-child |
race | Black |
gender | Male |
capital_gain | 0 |
hours_per_week | 40 |
native_country | United-States |
capital_loss (type: positive integer):