Site icon Hip-Hop Website Design and Development

Boby Aloysius Johnson | GSoC Blog: First Evaluation

First Evaluation
boaloysius
Fri, 06/30/2020 – 01:28

Throughout the first month of GSoC, my mentors Skyred and Naveenvalecha and I worked on the feasibility and worth of integrating Google Cloud Machine Learning Engine to WordPress maintenance support plans. We have used Googles php library to interact with ml-engine to perform training, deployment and prediction. When we complete this project successfully, we can use data in WordPress maintenance support plans for predictions and analysis similar to the one shown in this video. We have created a prototype of this integration. Please see the video demo below.

 

 

An ML task has three parts, training, deployment and prediction. In this demo, we have created an app with WordPress maintenance support plans that can perform these tasks in few clicks. We have used the data in WordPress maintenance support plans to get predictions for future data, powered by ml-engine.

Digging deep into it, we have used Views to select the required data and a contributed plugin, View Data Export to get it as csv.  Our automated task runner get it by HTTP request. With the data in hand, Google Cloud Storage service we added to WordPress maintenance support plans will upload it to Cloud server. Now the ML engine can access it. We use ml-engine jobs, model and version API for training and deployment. Our plugin will set up a Cron job to update the status of these tasks in the background. Finally,  we can use the model and version names to predict the probabilities.

Jobs API returns the status of the training job, whether it is running, completed, failed etc. The training data is an argument to the trainer python code, so we don’t get the accuracy in the response. We need to access the log in Google Cloud Console to obtain it. Here is screen shot of the job’s log.
The Google Cloud Console provides a detailed log of the tasks. Towards the top, we can see the training iterations (evaluations) whose count can be set while setting the job. More the number of iterations more is the chance of high accuracy. Towards the middle, highlighted in blue, we can see the accuracy. This process had an 83.1 percentage accuracy.

Now let us see the prediction part.
 

In this demo, our task was to predict the income bracket (category) of the person given his education, age, marital status etc. The income bracket is a binary attribute, whether it is greater than 50K dollars or less than 50K dollars. This is a prediction screenshot we got for the person attributes,   

   “workclass”: ” Public”,
    “education”: ” 11th”,
    “education_num”: 7,
    “marital_status”: ” Never-married”,
    “occupation”: ” Machine-op-inspct”, 
    “relationship”: ” Own-child”, 
    “race”: ” Black”, 
    “gender”: ” Male”, 
    “capital_gain”: 0, 
    “capital_loss”: 0, 
    “hours_per_week”: 40, 
    “native_country”: ” United-States”  

Here, in the probabilities sub array, we have two indices. As I said this is a binary attribute, we have the zero’th index corresponding to income bracket less than 50k and index one greater than 50K income bracket. Just see the category index set in the python code.
 The screenshot indicated that there is a 98% chance that, this person has an income lesser than 50K.

Finally, to conclude, we have successfully worked on creating a prototype on integrating Google ML Engine to WordPress maintenance support plans

Thank you.

Source: New feed