It\’s Easy – Salesforce+Machine Learning+Google Prediction API By Hirdaypal Lamba

Before I share as to how easy it is to implement machine learning algorithm to Salesforce data, little bit of history on what made me spend 6 hours over the weekend to explore Machine Learning world.

Thanks to meetup.com, I sign up and play badminton with people in Mannheim, Germany. After beating everyone 🙂 (I play really good…not boasting!), we chat about our work life and met an person talking high funda stuff on Machine Learning and impressing people in group. When my turn came, I told them run of the mill story of project manager..doing clerical work like approving timesheets, collecting metrics, negotiating billing rate and controlling attrition :). So the other guy was data scientist and me just another worker in software factory.

Thought of spending quality time this weekend so that I may impress team with my technical knowledge during next badminton meetup. So the first stop was to open Google (what else!)  and learn fundamentals of machine learning. Few points to remember –

  • It is nothing but probability theory which I read while doing engineering and masters. It was complicated then and same now, for example Bayes equation like below still make my grey cells do rigorous exercise
  • Two sets of data are needed, training set and test set. Using Training set, the chosen Machine Learning  algorithm is trained and then test set is use to see the accuracy.
  • Their are many machine learning algorithms and no one claims to be best since this is experimental science, more you train better the probability of finding outcome is.
    • NaĂŻve Bayes Classifier Algorithm
    • K Means Clustering Algorithm
    • Support Vector Machine Algorithm
    • Apriori Algorithm
    • Linear Regression
    • Logistic Regression
    • Artificial Neural Networks
    • Random Forests
    • Decision Trees
    •  Nearest Neighbours

Now it was time to put the theory into practice. I read consulting firms advertising their proprietary tools to do data mining and predicting future/missing values using machine learning algorithms and in turn charging unethical billing rate for science that is to make life of humans better. Keeping politics aside, I knew there has to be easy way of doing data mining on salesforce data. Again, Google came to rescue 🙂

Their are enough good people in the world who have done heavy lifting using API\’s and my job was to connect the dots and  get my job done. My job was to predict the winner of cricket match, provided historic values are available. I selected cricket as the dataset since most of my colleagues get excited when TV commentator predicts winner at the start or during half time with funky graphics and data. Also, learning with sports related data is better than pharmaceutical data when most of software people has no idea what this data is all about.

Back to proof of concept now, I created custom object in salesforce and populated data like below image –

 In this custom object, as per machine learning algorithm lingo we have –

  • Attributes – 6 attributes like 1st Innings score, 2nd Innings score, Ground city, Team 1, Team 2 and Weather Outlook.
  • Class – 1 class by name Winner. This is the outcome that we are trying to predict based on above attributes value
  • Instances – 100 instances or records that are use as training data set

Next step was to install two addons on google spreadsheet –

I created short video showing how easy it is to use above addons and do prediction on salesforce data with no coding effort 🙂

Watch full hands on practice vedio here

Few of practical usage of above could be to predict –

  • Lead conversion probability
  • Opportunity win/loss probability
  • Customer retention based on case comments/feedback

I hope, this post help to unravel the mystery on machine learning in a practical way and are able to provide value to your salesforce customers to unlock data insights.

 

Cheers!!!

Oh hi there đź‘‹
It’s nice to meet you.

Sign up to receive awesome content in your inbox, every month.

We don’t spam! Please check your mail for confirmation.

2 thoughts on “It\’s Easy – Salesforce+Machine Learning+Google Prediction API By Hirdaypal Lamba”

  1. Ramandeep Kaur

    This was really an interesting stuff you shared. Can you please share the training data sheet so that I can understand the pattern of the data. I really need this urgently.

Leave a Comment

Your email address will not be published. Required fields are marked *

Select Language »