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:
- Load the sample dataset.
- Train the data.
- Use the generated function to predict the outcome for the new Dataset.