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

Building Smarter Apps Using PredictionIO and Heroku

If you recall in Chapter 1, Introduction to AI, we covered the basics of machine learning and covered a simple experiment by integrating Google's Prediction API with the Force.com platform. The infrastructure and the web service was all maintained by Google, and we just consumed it.

In this chapter, we will cover PredictionIO which is a part of Einstein's offering exclusive for developers to build machine learning algorithms with Salesforce/external data. PredictionIO abstracts the complexity of setting a machine learning system to build predictive applications. It helps us simplify by setting the infrastructure and responds to dynamic queries in real time once deployed as a web service. It is also used internally by Salesforce and various other open source apps. Since it is open source, developers can use this to build smarter apps with the Salesforce data.

This chapter will cover the basics of PredictionIO and how to deploy a machine learning algorithm and engine offered by PredictionIO on the Heroku Cloud. Heroku is a part of the Salesforce App Cloud offering that lets you run, deploy, and manage applications written in Java, Scala, Node.js, Ruby, Go, and PHP without worrying about the infrastructure. The Heroku Cloud makes an excellent developer experience with its command-line interface (CLI) and integration support for git/GitHub (web-based version control repository) and Docker (Docker is an open source project that automates the deployment of applications inside software containers).

The chapter starts with an Introduction to PredictionIO, architecture, and how to run it locally on MAC/LINUX. Once we understand the different components PredictionIO provides, we will explore how we can deploy a machine learning algorithm and engine on the Heroku infrastructure. This chapter is exclusively targeted toward developers and data scientists, and the prerequisite for this chapter is that you have an understanding of the steps involved in machine learning, which was covered in Chapter 1, Introduction to AI. Familiarity with Java/Scala and using git as a version control system, understanding the basic Terminal commands of MAC/LINUX, and also some basics of Hadoop will help accelerate the understanding of concepts. To gain maximum benefit from the content, it is advisable to use the MAC/LINUX machine for installation and try it out hands-on to gain the necessary practical insight.

In this chapter, we will cover the following topics: 

  • Introduction to PredictionIO 
  • Architecture and Integration with web/mobile applications
  • Installation of PredictionIO
  • Getting started with PredictionIO
  • PredictionIO DASE components and customization of Engine
  • Deploying PredictionIO on Heroku