This document discusses building a recommendation engine for a PHP application using PredictionIO. It covers installing PredictionIO, modeling event data, creating recommendation engines, and implementing functions for recording user actions and getting recommendations. Key aspects include modeling view, like, and purchase events, handling cold starts for users and items, and retraining engines daily with new data to provide personalized book and ebook recommendations.
27. Pattern: user -- action -- item
User 1 purchased product X
User 2 viewed product Y
User 1 added product Z in the cart
28. $ pio app new MyApp1
[INFO] [App$] Initialized Event Store for this app ID: 1.
[INFO] [App$] Created new app:
[INFO] [App$] Name: MyApp1
[INFO] [App$] ID: 1
[INFO] [App$] Access Key:
3mZWDzci2D5YsqAnqNnXH9SB6Rg3dsTBs8iHkK6X2i54IQsIZI1eEeQQyMfs7b3F
$ pio eventserver
29. Server runs on port 7070 by default
$ curl -i -X GET http://localhost:7070
{“status":"alive"}
30. $ curl -i -X GET “http://localhost:
7070/events.json?
accessKey=$ACCESS_KEY"