Learning Salesforce Einstein
上QQ阅读APP看书,第一时间看更新

Training and prediction

The regression type predictive model uses a numeric answer for the question based on the previous samples. For this example, we will use this regression type predictive model. Take a look at the file located at (https://github.com/PacktPublishing/Learning-Salesforce-Einstein/blob/master/Chapter1/SFOpportunity.csv). The first column is probability, the second column is opportunity stage and the last column is the opportunity revenue. If you look carefully, you will notice that there is some correlation between the type of opportunity, expected revenue, and probability.

If you observe the dataset sample closely, you will see that for opportunities of type Existing customers, the higher the expected revenue, the more the probability.

To train the Dataset, we will leverage the Prediction API provided by Google. The complete set of APIs is listed in the following table:

If you recall, machine learning consists of three steps:

  1. Load the sample dataset.
  2. Train the data.
  3. Use the generated function to predict the outcome for the new Dataset.