Wednesday 15 April 2015

How the Google Predicition API Can Help a Business Ratings and Reviews Service Like Wasamundi.com

This is the second in a series of post about how the Google Prediction API can help some start-ups I know in Cameroon. This series is aimed at promoting the creation of smarter services based on machine learning within the community. Here are other parts of the series:
Part 1: How the Google Predicition API Can Help a Jobs Website Like Njorku.com


Wasamundi.com is a Cameroonian business reviews and ratings service on a mission to increase and improve visibility of local businesses online across search engines, social networks and mobile phones.




















The Google Prediction API on the other hand is a machine learning cloud service that can be used to analyse data and predict future outcomes.

Looking at Wasamundi there are 2 ways I think the Prediction API can help:
  • Customer sentiment analysis
  • Spam detection
For a case like customer sentiment analysis you are interested in determining the mood of your customers about a particular business using machine learning. So you will send comments users make on the companies page to the Prediction API which then replies with the sentiment the comment carries. For example the following comments are indicated with their inferred sentiments (The training data CSV file will be of this format without the list item dots):
  • "happy","Ate the best fried ever at Mouth Power this afternoon"
  • "angry","I hate the shawarma at mile 80 park, too wet!"
  • "sad","I wish the waitress at Buea Cafe was not frowning all day"
  • "indifferent","Just had a some coffee at the Mid Town Coffee House"
After creating training data such as this, all you will have to do is send any user comment to the Prediction API and it will reply with the mood inferred by the comment e.g sending a comment like "Had a two plates of potato and egg at UB junction and I will say its the best in town" to the API will give you a reply of "happy". Keep in mind that you want to have hundreds or thousands of samples for each mood.

You can then use this inferred sentiments  to do some more analysis e.g whats the most loved business based on comments and not "star ratings".

For the spam detection use case, it will be done similarly but in place of the moods you will want to replace it with categories like "spam" and "not spam".

Want to give the Prediction API a spin? Check out the docs.


Monday 30 March 2015

How the Google Predicition API Can Help a Jobs Website Like Njorku.com

This is the first in a series of post about how the Google Prediction API can help some start-ups I know in Cameroon. This series is aimed at promoting the creation of smarter services based on machine learning within the community. Other Parts in the series:
Part 2: How the Google Predicition API Can Help a Business ratings and Reviews Service Like Wasamundi.com





There has been lots of buzz about the cloud in recent years and you may have heard of popular cloud related acronyms like IaaS (Infrastructure as a Service), PaaS (Platform as a Service) and SaaS (Software as a Service). If you have never heard of them, close this page, go to Youtube and watch Gangnam Style for this was not written with you in mind. Now back to the cloud talk. Today I invent a new acronym, MLaaS (Machine Learning as a Service) - at least I think I have invented the acronym.

Machine Learning.

If you know what machine learning is, skip to "How the Google Predicition API Can Help a Jobs Website"

Machine Learning is ... well you guessed it, "Machine Learning". Its all about teaching machines to make predictions, decisions or recommendations based on historical data (your computer science teacher may not describe it like that, but then he did not write this post).

Now put one and two together and you get Machine Learning as a Service which is a cloud service that provides apps or humans with machine learning services via a pay-as-you-use model. Freeing them of the burden of having to build machine learning software themselves, buying a machine to run it or both.

The Googe Prediction API is an example of a machine learning cloud service.

How the Google Predicition API Can Help a Jobs Website.

The Google Predicition API a machine learning service which in Google words gives you the ability to "Use Google’s machine learning algorithms to analyze data and predict future outcomes using a familiar RESTful interface."

This can be used by a jobs website like Njorku in the following ways:
  1. Automatically categorize user submitted CVs. For example a user should submit her/his CV and it will be categorized as Marketing, Software Engineering, or Legal to name a few so that only jobs relevant to that category are emailed to the user. The reverse can also be done where by jobs crawled from other websites are automatically categorized using machine learning and emailed only to users interested in that category
  2. Do a "Users who viewed/liked this job also viewed/liked the following jobs" section. Where by a user viewing a banking job gets recommended other jobs based on what previous viewers of that job liked/viewed.
Many more ideas come to mind but I planned to write this in an hour and for you to read this post in five minutes but I fear I am already failing at one if not both.

So How Will This Work ?

For the first use case, people will have to build the training data for the model. This can be a CSV file that looks like this:  


"marketting", "text found in one user submitted marketing CV"
"software engineering", "text found in user submitted software engineering CV"
"marketting", "text found in another user submitted marketing CV"
"legal", "text found in a lawyers CV"

To build a good model, you will need hundreds of CVs per category but a usable model can be created with at least tens of CVs per a category.

This is a basic idea with the least implementation information required to push it through. Taking it to production will need some more development. You can start by reading the Google Prediction API documentation.

Next week I will write on how a real estate service like WasaHostel or a local business directory like WasaMundi can use the Google Prediction API to their advantage.

You can recommend any start-ups you will like me to "make smarter". :-)

Update:

How the Google Predicition API Can Help a Business ratings and Reviews Service Like Wasamundi.com