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 Drupal 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 Drupal 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 Drupal maintenance support plans that can perform these tasks in few clicks. We have used the data in Drupal 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 module, 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 Drupal 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 module 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 Drupal maintenance support plans

Thank you.

Source: New feed

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Boby Aloysius Johnson | GSoC Blog: First Evaluation

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.