http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c5d52816/templates/complementarypurchase/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/complementarypurchase/quickstart/index.html 
b/templates/complementarypurchase/quickstart/index.html
index 68d36d2..43bc5c2 100644
--- a/templates/complementarypurchase/quickstart/index.html
+++ b/templates/complementarypurchase/quickstart/index.html
@@ -32,7 +32,7 @@ Your system is all ready to go.
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span>               MyApp1 |    1 | 
3mZWDzci2D5YsqAnqNnXH9SB6Rg3dsTBs8iHkK6X2i54IQsIZI1eEeQQyMfs7b3F | <span 
class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span>               MyApp2 |    2 | 
io5lz6Eg4m3Xe4JZTBFE13GMAf1dhFl6ZteuJfrO84XpdOz9wRCrDU44EUaYuXq5 | <span 
class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span> Finished listing 2 app<span class="o">(</span>s<span 
class="o">)</span>.
-</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 
id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, 
let&#39;s collect training data for this Engine. By default, Complementary 
Purchase Engine Template supports the following entities: 
<strong>user</strong>, <strong>item</strong>. A user buys an item. This 
template requires user-buy-item events.</p><p>Note that the engine requires 
correct buy event time being used in order to determine if the items being 
bought are in the same &#39;basket&#39;, which is configured by the 
&#39;basketWindow&#39; parameter. Using an unreal event time for the buy events 
will cause an incorrect model. If you use SDK, the current time is used as 
event time by default.</p><div class="alert-message warning"><p>In particular, 
make sure correct event time is specified if you import data in batch (i.e. not 
in real time). If the event time is omitted, the SDK will use <strong>current 
time</strong> as event time which 
 is not the actual time of the buy event in this case!</p></div><p>You can send 
these events to PredictionIO Event Server in real-time easily by making a HTTP 
request or through the provided SDK. Please see <a href="/appintegration/">App 
Integration Overview</a> for more details how to integrate your app with 
SDK.</p><p>Let&#39;s try sending events to EventServer with the following 
<code>curl</code> commands (The corresponding SDK code is showed in other 
tabs).</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the Access Key 
generated in above steps. Note that <code>localhost:7070</code> is the default 
URL of the Event Server.</p><p>For convenience, set your access key to the 
shell variable, run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> 
<p><a href="#"></a></p> <p>When an user u0 buys item i0 on time 
<code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if 
eventTime is not specified), you can send a buy event. Run the following 
<code>curl</code> command:<
 /p><div class="tabs"> <ul class="control"> <li data-lang="json"><a 
href="#tab-f17f86b9-e820-43c4-9962-03eb7c32ddbe">REST API</a></li> <li 
data-lang="python"><a href="#tab-914af354-551d-46e3-8f3f-dcc33b9ab8ed">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-fd31d832-657c-4495-bf4c-c5d0e8489968">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-9abfc24b-faed-4289-84b5-b3b05ee17856">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-4f497622-e2a4-4d0d-9692-ba8559e95f90">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-f17f86b9-e820-43c4-9962-03eb7c32ddbe"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 
id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, 
let&#39;s collect training data for this Engine. By default, Complementary 
Purchase Engine Template supports the following entities: 
<strong>user</strong>, <strong>item</strong>. A user buys an item. This 
template requires user-buy-item events.</p><p>Note that the engine requires 
correct buy event time being used in order to determine if the items being 
bought are in the same &#39;basket&#39;, which is configured by the 
&#39;basketWindow&#39; parameter. Using an unreal event time for the buy events 
will cause an incorrect model. If you use SDK, the current time is used as 
event time by default.</p><div class="alert-message warning"><p>In particular, 
make sure correct event time is specified if you import data in batch (i.e. not 
in real time). If the event time is omitted, the SDK will use <strong>current 
time</strong> as event time which 
 is not the actual time of the buy event in this case!</p></div><p>You can send 
these events to PredictionIO Event Server in real-time easily by making a HTTP 
request or through the provided SDK. Please see <a href="/appintegration/">App 
Integration Overview</a> for more details how to integrate your app with 
SDK.</p><p>Let&#39;s try sending events to EventServer with the following 
<code>curl</code> commands (The corresponding SDK code is showed in other 
tabs).</p><p>Replace <code>&lt;ACCCESS_KEY&gt;</code> by the Access Key 
generated in above steps. Note that <code>localhost:7070</code> is the default 
URL of the Event Server.</p><p>For convenience, set your access key to the 
shell variable, run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> 
<p><a href="#"></a></p> <p>When an user u0 buys item i0 on time 
<code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if 
eventTime is not specified), you can send a buy event. Run the following 
<code>curl</code> command:<
 /p><div class="tabs"> <ul class="control"> <li data-lang="json"><a 
href="#tab-5cc6183c-689c-481e-a771-ef12be0d4e11">REST API</a></li> <li 
data-lang="python"><a href="#tab-cfcb8db1-3a31-48e3-a113-542aefb02110">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-e732d5c0-332c-44fc-a6b2-cee4e8dddeab">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-659a6694-055f-4680-8a83-808cbf328864">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-ebad5e6c-1d5d-44bb-ade7-6a0e7e336511">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-5cc6183c-689c-481e-a771-ef12be0d4e11"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -51,7 +51,7 @@ Your system is all ready to go.
   "targetEntityId" : "i0",
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-914af354-551d-46e3-8f3f-dcc33b9ab8ed"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-cfcb8db1-3a31-48e3-a113-542aefb02110"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -104,7 +104,7 @@ Your system is all ready to go.
   <span class="n">target_entity_id</span><span class="o">=&lt;</span><span 
class="n">ITEM</span> <span class="n">ID</span><span class="o">&gt;</span><span 
class="p">,</span>
   <span class="n">event_time</span><span class="o">=&lt;</span><span 
class="n">EVENT_TIME</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-fd31d832-657c-4495-bf4c-c5d0e8489968"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-e732d5c0-332c-44fc-a6b2-cee4e8dddeab"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -155,7 +155,7 @@ Your system is all ready to go.
 <span class="p">));</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-9abfc24b-faed-4289-84b5-b3b05ee17856"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-659a6694-055f-4680-8a83-808cbf328864"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -200,7 +200,7 @@ Your system is all ready to go.
     <span class="s1">'eventTime'</span> <span class="o">=&gt;</span> <span 
class="o">&lt;</span><span class="no">EVENT_TIME</span><span 
class="o">&gt;</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-4f497622-e2a4-4d0d-9692-ba8559e95f90"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-ebad5e6c-1d5d-44bb-ade7-6a0e7e336511"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -290,7 +290,7 @@ User u10 buys item s2i1 at 2014-10-19 15:43:15.618000-07:53
 </pre></td></tr></tbody></table> </div> <p>When the engine is deployed 
successfully and running, you should see a console message similar to the 
following:</p><div class="highlight shell"><table style="border-spacing: 
0"><tbody><tr><td class="gutter gl" style="text-align: right"><pre 
class="lineno">1
 2</pre></td><td class="code"><pre><span class="o">[</span>INFO] <span 
class="o">[</span>HttpListener] Bound to /0.0.0.0:8000
 <span class="o">[</span>INFO] <span class="o">[</span>MasterActor] Bind 
successful. Ready to serve.
-</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine 
process.</p><p>By default, the deployed engine binds to <a 
href="http://localhost:8000";><a 
href="http://localhost:8000";>http://localhost:8000</a></a>. You can visit that 
page in your web browser to check its status.</p><p><img alt="Engine Status" 
src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' 
class='header-anchors'>6. Use the Engine</h2><p>Now, You can query the engine. 
For example, return top 3 items which are frequently bought with item 
&quot;s2i1&quot;. You can sending this JSON &#39;{ &quot;items&quot; : 
[&quot;s2i1&quot;], &quot;num&quot; : 3 }&#39; to the deployed engine. The 
engine will return a JSON with the recommeded items.</p><p>If you include one 
or more items in the query, the engine will use each combination of the query 
items as condition, and return recommended items if there is any for this 
condition. For example, if you query items are [&quot;A&quot;, &quot;B&qu
 ot;], then the engine will use [&quot;A&quot;], [&quot;B&quot;], and 
[&quot;A&quot;, &quot;B&quot;] as condition and try to find top n recommended 
items for each combination.</p><p>You can simply send a query by making a HTTP 
request or through the <code>EngineClient</code> of an SDK.</p><p>With the 
deployed engine running, open another temrinal and run the following 
<code>curl</code> command or use SDK to send the query:</p><div class="tabs"> 
<ul class="control"> <li data-lang="json"><a 
href="#tab-9debb9a0-a51e-463a-b2b7-4702624fa581">REST API</a></li> <li 
data-lang="python"><a href="#tab-42c66147-b590-4271-b003-06c6d76e2ea3">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-f3fb6517-03aa-4018-84c5-a50c6da23d7c">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-d897ce67-ee98-4230-94da-a52b9082708a">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-3c0464a3-5595-4196-8307-3787dd0e3692">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" id="tab-9debb9a0-a51e-4
 63a-b2b7-4702624fa581"> <div class="highlight shell"> <table 
style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: 
right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine 
process.</p><p>By default, the deployed engine binds to <a 
href="http://localhost:8000";><a 
href="http://localhost:8000";>http://localhost:8000</a></a>. You can visit that 
page in your web browser to check its status.</p><p><img alt="Engine Status" 
src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' 
class='header-anchors'>6. Use the Engine</h2><p>Now, You can query the engine. 
For example, return top 3 items which are frequently bought with item 
&quot;s2i1&quot;. You can sending this JSON &#39;{ &quot;items&quot; : 
[&quot;s2i1&quot;], &quot;num&quot; : 3 }&#39; to the deployed engine. The 
engine will return a JSON with the recommeded items.</p><p>If you include one 
or more items in the query, the engine will use each combination of the query 
items as condition, and return recommended items if there is any for this 
condition. For example, if you query items are [&quot;A&quot;, &quot;B&qu
 ot;], then the engine will use [&quot;A&quot;], [&quot;B&quot;], and 
[&quot;A&quot;, &quot;B&quot;] as condition and try to find top n recommended 
items for each combination.</p><p>You can simply send a query by making a HTTP 
request or through the <code>EngineClient</code> of an SDK.</p><p>With the 
deployed engine running, open another terminal and run the following 
<code>curl</code> command or use SDK to send the query:</p><div class="tabs"> 
<ul class="control"> <li data-lang="json"><a 
href="#tab-4ed62f58-3bcb-4bea-9c00-13b3df864e3f">REST API</a></li> <li 
data-lang="python"><a href="#tab-103ccc97-c392-48c0-b937-7cc00e2854af">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-c75610f5-8954-4f28-bf3e-a7a171a705e1">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-934e6f85-991e-40a0-a22a-3c861c0f8cfe">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-d3735583-6926-472a-badf-df24098fff4a">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" id="tab-4ed62f58-3bcb-4
 bea-9c00-13b3df864e3f"> <div class="highlight shell"> <table 
style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: 
right"><pre class="lineno">1
 2
 3
 4
@@ -303,7 +303,7 @@ User u10 buys item s2i1 at 2014-10-19 15:43:15.618000-07:53
 }'</span> <span class="se">\</span>
 http://localhost:8000/queries.json
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-42c66147-b590-4271-b003-06c6d76e2ea3"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-103ccc97-c392-48c0-b937-7cc00e2854af"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -314,7 +314,7 @@ http://localhost:8000/queries.json
   <span class="s">"items"</span> <span class="p">:</span> <span 
class="p">[</span><span class="s">"s2i1"</span><span class="p">],</span>
   <span class="s">"num"</span> <span class="p">:</span> <span 
class="mi">3</span>
 <span class="p">})</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-f3fb6517-03aa-4018-84c5-a50c6da23d7c"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-c75610f5-8954-4f28-bf3e-a7a171a705e1"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -341,7 +341,7 @@ http://localhost:8000/queries.json
 <span class="nb">print_r</span><span class="p">(</span><span 
class="nv">$response</span><span class="p">);</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-d897ce67-ee98-4230-94da-a52b9082708a"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-934e6f85-991e-40a0-a22a-3c861c0f8cfe"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -360,7 +360,7 @@ http://localhost:8000/queries.json
 <span class="p">)</span>
 
 <span class="nb">puts</span> <span class="n">response</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-3c0464a3-5595-4196-8307-3787dd0e3692"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-d3735583-6926-472a-badf-df24098fff4a"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c5d52816/templates/complementarypurchase/quickstart/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/complementarypurchase/quickstart/index.html.gz 
b/templates/complementarypurchase/quickstart/index.html.gz
index dc4dbe7..5b97bb0 100644
Binary files a/templates/complementarypurchase/quickstart/index.html.gz and 
b/templates/complementarypurchase/quickstart/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c5d52816/templates/ecommercerecommendation/dase/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/ecommercerecommendation/dase/index.html.gz 
b/templates/ecommercerecommendation/dase/index.html.gz
index c824bec..df4c653 100644
Binary files a/templates/ecommercerecommendation/dase/index.html.gz and 
b/templates/ecommercerecommendation/dase/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c5d52816/templates/ecommercerecommendation/how-to/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/ecommercerecommendation/how-to/index.html.gz 
b/templates/ecommercerecommendation/how-to/index.html.gz
index 2f7acfb..6d7145b 100644
Binary files a/templates/ecommercerecommendation/how-to/index.html.gz and 
b/templates/ecommercerecommendation/how-to/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c5d52816/templates/ecommercerecommendation/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/ecommercerecommendation/quickstart/index.html 
b/templates/ecommercerecommendation/quickstart/index.html
index acda080..74bd3b9 100644
--- a/templates/ecommercerecommendation/quickstart/index.html
+++ b/templates/ecommercerecommendation/quickstart/index.html
@@ -32,7 +32,7 @@ Your system is all ready to go.
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span>               MyApp1 |    1 | 
3mZWDzci2D5YsqAnqNnXH9SB6Rg3dsTBs8iHkK6X2i54IQsIZI1eEeQQyMfs7b3F | <span 
class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span>               MyApp2 |    2 | 
io5lz6Eg4m3Xe4JZTBFE13GMAf1dhFl6ZteuJfrO84XpdOz9wRCrDU44EUaYuXq5 | <span 
class="o">(</span>all<span class="o">)</span>
 <span class="o">[</span>INFO] <span class="o">[</span>App<span 
class="nv">$]</span> Finished listing 2 app<span class="o">(</span>s<span 
class="o">)</span>.
-</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 
id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, 
let&#39;s collect training data for this Engine. By default, the E-Commerce 
Recommendation Engine Template supports 2 types of entities and 2 events: 
<strong>user</strong> and <strong>item</strong>; events <strong>view</strong> 
and <strong>buy</strong>. An item has the <strong>categories</strong> property, 
which is a list of category names (String). A user can view and buy an item. 
The specical <strong>constraint</strong> entiy with entityId 
<strong>unavailableItems</strong> defines a list of unavailable items and is 
taken into account in realtime during serving.</p><p>In summary, this template 
requires &#39;$set&#39; user event, &#39;$set&#39; item event, user-view-item 
events, user-buy-item event and &#39;$set&#39; constraint event.</p><div 
class="alert-message info"><p>This template can easily be customized to 
consider other user-to-it
 em events.</p></div><p>You can send these events to PredictionIO Event Server 
in real-time easily by making a HTTP request or through the provided SDK. 
Please see <a href="/appintegration/">App Integration Overview</a> for more 
details how to integrate your app with SDK.</p><p>Let&#39;s try sending events 
to EventServer with the following <code>curl</code> commands (The corresponding 
SDK code is showed in other tabs).</p><p>Replace 
<code>&lt;ACCCESS_KEY&gt;</code> by the Access Key generated in above steps. 
Note that <code>localhost:7070</code> is the default URL of the Event 
Server.</p><p>For convenience, set your access key to the shell variable, 
run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a 
href="#"></a></p> <p>For example, when a new user with id &quot;u0&quot; is 
created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current 
time will be used if eventTime is not specified), you can send a 
<code>$set</code> event for this user. To send this e
 vent, run the following <code>curl</code> command:</p><div class="tabs"> <ul 
class="control"> <li data-lang="json"><a 
href="#tab-9e268391-c969-4d5b-974b-d08b351c2f0b">REST API</a></li> <li 
data-lang="python"><a href="#tab-8c45669e-d26b-48f8-8469-425a0798e961">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-3af84b88-6965-4848-95cd-e5e1d559842f">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-7af6c3b7-2bcb-4e14-8923-f217fdacefbc">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-9b86d46c-223b-472a-9fcb-6f4ed972c888">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-9e268391-c969-4d5b-974b-d08b351c2f0b"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p><a href="#"></a></p> <h2 
id='4.-collecting-data' class='header-anchors'>4. Collecting Data</h2><p>Next, 
let&#39;s collect training data for this Engine. By default, the E-Commerce 
Recommendation Engine Template supports 2 types of entities and 2 events: 
<strong>user</strong> and <strong>item</strong>; events <strong>view</strong> 
and <strong>buy</strong>. An item has the <strong>categories</strong> property, 
which is a list of category names (String). A user can view and buy an item. 
The specical <strong>constraint</strong> entiy with entityId 
<strong>unavailableItems</strong> defines a list of unavailable items and is 
taken into account in realtime during serving.</p><p>In summary, this template 
requires &#39;$set&#39; user event, &#39;$set&#39; item event, user-view-item 
events, user-buy-item event and &#39;$set&#39; constraint event.</p><div 
class="alert-message info"><p>This template can easily be customized to 
consider other user-to-it
 em events.</p></div><p>You can send these events to PredictionIO Event Server 
in real-time easily by making a HTTP request or through the provided SDK. 
Please see <a href="/appintegration/">App Integration Overview</a> for more 
details how to integrate your app with SDK.</p><p>Let&#39;s try sending events 
to EventServer with the following <code>curl</code> commands (The corresponding 
SDK code is showed in other tabs).</p><p>Replace 
<code>&lt;ACCCESS_KEY&gt;</code> by the Access Key generated in above steps. 
Note that <code>localhost:7070</code> is the default URL of the Event 
Server.</p><p>For convenience, set your access key to the shell variable, 
run:</p><p><code>$ ACCESS_KEY=&lt;ACCESS_KEY&gt;</code></p> <p><a 
href="#"></a></p> <p>For example, when a new user with id &quot;u0&quot; is 
created in your app on time <code>2014-11-02T09:39:45.618-08:00</code> (current 
time will be used if eventTime is not specified), you can send a 
<code>$set</code> event for this user. To send this e
 vent, run the following <code>curl</code> command:</p><div class="tabs"> <ul 
class="control"> <li data-lang="json"><a 
href="#tab-da0cba86-4083-4ad8-9df0-d8e331cc520b">REST API</a></li> <li 
data-lang="python"><a href="#tab-ae968b56-a1ba-4e75-b683-60bfbeb3bbfa">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-15263895-da92-4e37-9ae6-e62b12266398">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-b988a21b-3f9e-40c2-bc87-c81fae4811ad">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-1bc2cbad-61bf-4115-81d7-9ddd597eeba9">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-da0cba86-4083-4ad8-9df0-d8e331cc520b"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -47,7 +47,7 @@ Your system is all ready to go.
   "entityId" : "u0",
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-8c45669e-d26b-48f8-8469-425a0798e961"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-ae968b56-a1ba-4e75-b683-60bfbeb3bbfa"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -78,7 +78,7 @@ Your system is all ready to go.
   <span class="n">entity_type</span><span class="o">=</span><span 
class="s">"user"</span><span class="p">,</span>
   <span class="n">entity_id</span><span class="o">=&lt;</span><span 
class="n">USER_ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-3af84b88-6965-4848-95cd-e5e1d559842f"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-15263895-da92-4e37-9ae6-e62b12266398"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -119,7 +119,7 @@ Your system is all ready to go.
   <span class="s1">'properties'</span> <span class="o">=&gt;</span> <span 
class="k">array</span><span class="p">(</span><span 
class="s1">'categories'</span> <span class="o">=&gt;</span> <span 
class="k">array</span><span class="p">(</span><span 
class="s1">'&lt;CATEGORY_1&gt;'</span><span class="p">,</span> <span 
class="s1">'&lt;CATEGORY_2&gt;'</span><span class="p">))</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-7af6c3b7-2bcb-4e14-8923-f217fdacefbc"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-b988a21b-3f9e-40c2-bc87-c81fae4811ad"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -136,7 +136,7 @@ Your system is all ready to go.
   <span class="s1">'user'</span><span class="p">,</span>
   <span class="o">&lt;</span><span class="no">USER</span> <span 
class="no">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-9b86d46c-223b-472a-9fcb-6f4ed972c888"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-1bc2cbad-61bf-4115-81d7-9ddd597eeba9"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -161,7 +161,7 @@ Your system is all ready to go.
   <span class="o">.</span><span class="na">entityType</span><span 
class="o">(</span><span class="s">"user"</span><span class="o">)</span>
   <span class="o">.</span><span class="na">entityId</span><span 
class="o">(&lt;</span><span class="n">USER_ID</span><span 
class="o">&gt;);</span>
 <span class="n">client</span><span class="o">.</span><span 
class="na">createEvent</span><span class="o">(</span><span 
class="n">userEvent</span><span class="o">);</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a new item 
&quot;i0&quot; is created in your app on time 
<code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if 
eventTime is not specified), you can send a <code>$set</code> event for the 
item. Note that the item is set with categories properties: 
<code>&quot;c1&quot;</code> and <code>&quot;c2&quot;</code>. Run the following 
<code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li 
data-lang="json"><a href="#tab-5e01e24d-323c-4236-850e-d172a16420ca">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-b9413070-800a-49f0-9d90-0ba13cdb7b95">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-0c22320d-0e4b-4b4b-9a95-9e3991abffd4">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-70168de5-60d1-492d-bd72-86cb4d1ed6e5">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-afab89c4-d376-4866-b9dd-be61d5cd077d">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-5e01e2
 4d-323c-4236-850e-d172a16420ca"> <div class="highlight shell"> <table 
style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: 
right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>When a new item 
&quot;i0&quot; is created in your app on time 
<code>2014-11-02T09:39:45.618-08:00</code> (current time will be used if 
eventTime is not specified), you can send a <code>$set</code> event for the 
item. Note that the item is set with categories properties: 
<code>&quot;c1&quot;</code> and <code>&quot;c2&quot;</code>. Run the following 
<code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li 
data-lang="json"><a href="#tab-bf01b8a0-af65-463f-9327-d26a069817fc">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-1578e45d-e4ae-40fd-9cd8-cf495480e839">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-05f24c9d-240e-4e41-9f6c-9cc6a12d02e8">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-fa3d8464-ac00-4aa6-a672-5141252895c8">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-cbe89150-19b7-4a88-a755-1e98816df6f1">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" id="tab-bf01b8
 a0-af65-463f-9327-d26a069817fc"> <div class="highlight shell"> <table 
style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-align: 
right"><pre class="lineno">1
 2
 3
 4
@@ -182,7 +182,7 @@ Your system is all ready to go.
   }
   "eventTime" : "2014-11-02T09:39:45.618-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-b9413070-800a-49f0-9d90-0ba13cdb7b95"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-1578e45d-e4ae-40fd-9cd8-cf495480e839"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -201,7 +201,7 @@ Your system is all ready to go.
     <span class="s">"categories"</span> <span class="p">:</span> <span 
class="p">[</span><span class="s">"&lt;CATEGORY_1&gt;"</span><span 
class="p">,</span> <span class="s">"&lt;CATEGORY_2&gt;"</span><span 
class="p">]</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-0c22320d-0e4b-4b4b-9a95-9e3991abffd4"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-05f24c9d-240e-4e41-9f6c-9cc6a12d02e8"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -218,7 +218,7 @@ Your system is all ready to go.
   <span class="s1">'properties'</span> <span class="o">=&gt;</span> <span 
class="k">array</span><span class="p">(</span><span 
class="s1">'categories'</span> <span class="o">=&gt;</span> <span 
class="k">array</span><span class="p">(</span><span 
class="s1">'&lt;CATEGORY_1&gt;'</span><span class="p">,</span> <span 
class="s1">'&lt;CATEGORY_2&gt;'</span><span class="p">))</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-70168de5-60d1-492d-bd72-86cb4d1ed6e5"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-fa3d8464-ac00-4aa6-a672-5141252895c8"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -235,7 +235,7 @@ Your system is all ready to go.
   <span class="p">}</span>
 <span class="p">)</span>
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-afab89c4-d376-4866-b9dd-be61d5cd077d"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-cbe89150-19b7-4a88-a755-1e98816df6f1"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -248,7 +248,7 @@ Your system is all ready to go.
   <span class="o">.</span><span class="na">entityId</span><span 
class="o">(&lt;</span><span class="n">ITEM_ID</span><span class="o">&gt;)</span>
   <span class="o">.</span><span class="na">property</span><span 
class="o">(</span><span class="s">"categories"</span><span class="o">,</span> 
<span class="n">ImmutableList</span><span class="o">.</span><span 
class="na">of</span><span class="o">(</span><span 
class="s">"&lt;CATEGORY_1&gt;"</span><span class="o">,</span> <span 
class="s">"&lt;CATEGORY_2&gt;"</span><span class="o">));</span>
 <span class="n">client</span><span class="o">.</span><span 
class="na">createEvent</span><span class="o">(</span><span 
class="n">itemEvent</span><span class="o">)</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>The properties of 
the <code>user</code> and <code>item</code> can be set, unset, or delete by 
special events <strong>$set</strong>, <strong>$unset</strong> and 
<strong>$delete</strong>. Please refer to <a 
href="/datacollection/eventapi/#note-about-properties">Event API</a> for more 
details of using these events.</p><p>When the user &quot;u0&quot; view item 
&quot;i0&quot; on time <code>2014-11-10T12:34:56.123-08:00</code> (current time 
will be used if eventTime is not specified), you can send a view event. Run the 
following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> 
<li data-lang="json"><a href="#tab-eb0a6faf-4288-4a76-8518-f1811dfa9c94">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-8803aa6e-39d8-43dc-a42a-83343de1d2e8">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-d2110766-fe4b-4797-9bc9-419fd8581870">PHP 
SDK</a></li> <li data-lang="ruby"><a href="#tab-b68d1261-7d7b-4f1e-881f-4ad3bc
 4cab06">Ruby SDK</a></li> <li data-lang="java"><a 
href="#tab-763c4e63-f433-4b67-9207-0ae645217350">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-eb0a6faf-4288-4a76-8518-f1811dfa9c94"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>The properties of 
the <code>user</code> and <code>item</code> can be set, unset, or delete by 
special events <strong>$set</strong>, <strong>$unset</strong> and 
<strong>$delete</strong>. Please refer to <a 
href="/datacollection/eventapi/#note-about-properties">Event API</a> for more 
details of using these events.</p><p>When the user &quot;u0&quot; view item 
&quot;i0&quot; on time <code>2014-11-10T12:34:56.123-08:00</code> (current time 
will be used if eventTime is not specified), you can send a view event. Run the 
following <code>curl</code> command:</p><div class="tabs"> <ul class="control"> 
<li data-lang="json"><a href="#tab-f0b2936c-841d-4439-afb3-66550cb8481e">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-e4f18e31-eaae-4890-bba0-bf0dd0da534f">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-a2d6e7a2-b3d4-41ac-9ee7-a2211e3bde16">PHP 
SDK</a></li> <li data-lang="ruby"><a href="#tab-56219996-a309-48e1-8bfb-c4f591
 3797c4">Ruby SDK</a></li> <li data-lang="java"><a 
href="#tab-18096767-6d01-49ed-a86f-3e988225b0a4">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-f0b2936c-841d-4439-afb3-66550cb8481e"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -267,7 +267,7 @@ Your system is all ready to go.
   "targetEntityId" : "i0",
   "eventTime" : "2014-11-10T12:34:56.123-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-8803aa6e-39d8-43dc-a42a-83343de1d2e8"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-e4f18e31-eaae-4890-bba0-bf0dd0da534f"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -284,7 +284,7 @@ Your system is all ready to go.
   <span class="n">target_entity_type</span><span class="o">=</span><span 
class="s">"item"</span><span class="p">,</span>
   <span class="n">target_entity_id</span><span class="o">=&lt;</span><span 
class="n">ITEM</span> <span class="n">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-d2110766-fe4b-4797-9bc9-419fd8581870"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-a2d6e7a2-b3d4-41ac-9ee7-a2211e3bde16"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -303,7 +303,7 @@ Your system is all ready to go.
    <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> <span 
class="o">&lt;</span><span class="nx">ITEM</span> <span 
class="nx">ID</span><span class="o">&gt;</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-b68d1261-7d7b-4f1e-881f-4ad3bc4cab06"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-56219996-a309-48e1-8bfb-c4f5913797c4"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -322,7 +322,7 @@ Your system is all ready to go.
   <span class="p">}</span>
 <span class="p">)</span>
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-763c4e63-f433-4b67-9207-0ae645217350"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-18096767-6d01-49ed-a86f-3e988225b0a4"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -337,7 +337,7 @@ Your system is all ready to go.
     <span class="o">.</span><span class="na">targetEntityType</span><span 
class="o">(</span><span class="s">"item"</span><span class="o">)</span>
     <span class="o">.</span><span class="na">targetEntityId</span><span 
class="o">(&lt;</span><span class="n">ITEM_ID</span><span 
class="o">&gt;);</span>
 <span class="n">client</span><span class="o">.</span><span 
class="na">createEvent</span><span class="o">(</span><span 
class="n">viewEvent</span><span class="o">);</span>
-</pre></td> </tr></tbody></table> </div> </div> </div> <p>When the user 
&quot;u0&quot; buy item &quot;i0&quot; on time 
<code>2014-11-10T13:00:00.123-08:00</code> (current time will be used if 
eventTime is not specified), you can send a view event. Run the following 
<code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li 
data-lang="json"><a href="#tab-7a55018e-8e5a-471d-90a4-6c69b6ee84d4">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-bc669c73-d1b7-4083-8229-6099a0f0f91d">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-f8d86663-4290-4434-8772-f80fd57418eb">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-6cc1ed83-3e47-4e2a-9123-23d16daa1461">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-135dfb5d-79a9-4739-afd9-5bd681055fb3">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" 
id="tab-7a55018e-8e5a-471d-90a4-6c69b6ee84d4"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-
 align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> </div> <p>When the user 
&quot;u0&quot; buy item &quot;i0&quot; on time 
<code>2014-11-10T13:00:00.123-08:00</code> (current time will be used if 
eventTime is not specified), you can send a view event. Run the following 
<code>curl</code> command:</p><div class="tabs"> <ul class="control"> <li 
data-lang="json"><a href="#tab-8877ec13-c5c8-4229-9f92-9a71b02b5e07">REST 
API</a></li> <li data-lang="python"><a 
href="#tab-d85d369e-3893-49c8-8b90-f7419381ebc6">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-c2ad5769-cb55-4969-94ae-ea6164c9dd5c">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-5ba5039d-bd3d-4f33-89fd-59990e29dc75">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-210a6815-6a2a-4d59-83e2-1bd1739ba89d">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" 
id="tab-8877ec13-c5c8-4229-9f92-9a71b02b5e07"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" style="text-
 align: right"><pre class="lineno">1
 2
 3
 4
@@ -356,7 +356,7 @@ Your system is all ready to go.
   "targetEntityId" : "i0",
   "eventTime" : "2014-11-10T13:00:00.123-08:00"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-bc669c73-d1b7-4083-8229-6099a0f0f91d"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-d85d369e-3893-49c8-8b90-f7419381ebc6"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -373,7 +373,7 @@ Your system is all ready to go.
   <span class="n">target_entity_type</span><span class="o">=</span><span 
class="s">"item"</span><span class="p">,</span>
   <span class="n">target_entity_id</span><span class="o">=&lt;</span><span 
class="n">ITEM</span> <span class="n">ID</span><span class="o">&gt;</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-f8d86663-4290-4434-8772-f80fd57418eb"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-c2ad5769-cb55-4969-94ae-ea6164c9dd5c"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -392,7 +392,7 @@ Your system is all ready to go.
    <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> <span 
class="o">&lt;</span><span class="nx">ITEM</span> <span 
class="nx">ID</span><span class="o">&gt;</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-6cc1ed83-3e47-4e2a-9123-23d16daa1461"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-5ba5039d-bd3d-4f33-89fd-59990e29dc75"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -409,7 +409,7 @@ Your system is all ready to go.
     <span class="s1">'targetEntityId'</span> <span class="o">=&gt;</span> 
<span class="o">&lt;</span><span class="no">ITEM</span> <span 
class="no">ID</span><span class="o">&gt;</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-135dfb5d-79a9-4739-afd9-5bd681055fb3"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-210a6815-6a2a-4d59-83e2-1bd1739ba89d"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -490,19 +490,19 @@ User u10 buys item i40
 </pre></td></tr></tbody></table> </div> <p>When the engine is deployed 
successfully and running, you should see a console message similar to the 
following:</p><div class="highlight shell"><table style="border-spacing: 
0"><tbody><tr><td class="gutter gl" style="text-align: right"><pre 
class="lineno">1
 2</pre></td><td class="code"><pre><span class="o">[</span>INFO] <span 
class="o">[</span>HttpListener] Bound to /0.0.0.0:8000
 <span class="o">[</span>INFO] <span class="o">[</span>MasterActor] Bind 
successful. Ready to serve.
-</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine 
process.</p><p>By default, the deployed engine binds to <a 
href="http://localhost:8000";><a 
href="http://localhost:8000";>http://localhost:8000</a></a>. You can visit that 
page in your web browser to check its status.</p><p><img alt="Engine Status" 
src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' 
class='header-anchors'>6. Use the Engine</h2><p>Now, You can retrieve predicted 
results. To recommend 4 items to user ID &quot;u1&quot;. You send this JSON 
<code>{ &quot;user&quot;: [&quot;u1&quot;], &quot;num&quot;: 4 }</code> to the 
deployed engine and it will return a JSON of the recommended items. Simply send 
a query by making a HTTP request or through the <code>EngineClient</code> of an 
SDK.</p><p>With the deployed engine running, open another temrinal and run the 
following <code>curl</code> command or use SDK to send the query:</p><div 
class="tabs"> <ul class="control"> <li data-lang="
 json"><a href="#tab-3a627884-c971-4eb6-b2bb-5bd362e4120b">REST API</a></li> 
<li data-lang="python"><a 
href="#tab-947d44cd-15f3-43c8-b435-92aad4ba6086">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-6cd96c70-022d-46d9-9e34-1c1583ad37fa">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-01f86f6c-1313-4332-976d-e2a44e31d89f">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-fbb1d25e-8872-4c0a-822f-2086bff7aea1">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" 
id="tab-3a627884-c971-4eb6-b2bb-5bd362e4120b"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p>Do not kill the deployed engine 
process.</p><p>By default, the deployed engine binds to <a 
href="http://localhost:8000";><a 
href="http://localhost:8000";>http://localhost:8000</a></a>. You can visit that 
page in your web browser to check its status.</p><p><img alt="Engine Status" 
src="/images/engine-server-3246414b.png"/></p></p><h2 id='6.-use-the-engine' 
class='header-anchors'>6. Use the Engine</h2><p>Now, You can retrieve predicted 
results. To recommend 4 items to user ID &quot;u1&quot;. You send this JSON 
<code>{ &quot;user&quot;: [&quot;u1&quot;], &quot;num&quot;: 4 }</code> to the 
deployed engine and it will return a JSON of the recommended items. Simply send 
a query by making a HTTP request or through the <code>EngineClient</code> of an 
SDK.</p><p>With the deployed engine running, open another terminal and run the 
following <code>curl</code> command or use SDK to send the query:</p><div 
class="tabs"> <ul class="control"> <li data-lang="
 json"><a href="#tab-657130cc-ac6b-4147-b53a-e902ad0360b2">REST API</a></li> 
<li data-lang="python"><a 
href="#tab-72c4f2fa-8f90-4b94-aa29-22f8a7869905">Python SDK</a></li> <li 
data-lang="php"><a href="#tab-4345a7a0-ca0a-4aae-9f27-186daa1b3833">PHP 
SDK</a></li> <li data-lang="ruby"><a 
href="#tab-f35a759a-2f39-4e9a-807d-d78ac5932e85">Ruby SDK</a></li> <li 
data-lang="java"><a href="#tab-c196a171-174b-417d-b179-fd7486e8a91e">Java 
SDK</a></li> </ul> <div data-tab="REST API" data-lang="json" 
id="tab-657130cc-ac6b-4147-b53a-e902ad0360b2"> <div class="highlight shell"> 
<table style="border-spacing: 0"><tbody><tr> <td class="gutter gl" 
style="text-align: right"><pre class="lineno">1
 2
 3
 4</pre></td> <td class="code"><pre><span class="gp">$ </span>curl -H <span 
class="s2">"Content-Type: application/json"</span> <span class="se">\</span>
 -d <span class="s1">'{ "user": "u1", "num": 4 }'</span> <span 
class="se">\</span>
 http://localhost:8000/queries.json
 
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-947d44cd-15f3-43c8-b435-92aad4ba6086"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-72c4f2fa-8f90-4b94-aa29-22f8a7869905"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3</pre></td> <td class="code"><pre><span class="kn">import</span> <span 
class="nn">predictionio</span>
 <span class="n">engine_client</span> <span class="o">=</span> <span 
class="n">predictionio</span><span class="o">.</span><span 
class="n">EngineClient</span><span class="p">(</span><span 
class="n">url</span><span class="o">=</span><span 
class="s">"http://localhost:8000";</span><span class="p">)</span>
 <span class="k">print</span> <span class="n">engine_client</span><span 
class="o">.</span><span class="n">send_query</span><span 
class="p">({</span><span class="s">"user"</span><span class="p">:</span> <span 
class="s">"u1"</span><span class="p">,</span> <span class="s">"num"</span><span 
class="p">:</span> <span class="mi">4</span><span class="p">})</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-6cd96c70-022d-46d9-9e34-1c1583ad37fa"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-4345a7a0-ca0a-4aae-9f27-186daa1b3833"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -521,7 +521,7 @@ http://localhost:8000/queries.json
 <span class="nb">print_r</span><span class="p">(</span><span 
class="nv">$response</span><span class="p">);</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-01f86f6c-1313-4332-976d-e2a44e31d89f"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-f35a759a-2f39-4e9a-807d-d78ac5932e85"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -534,7 +534,7 @@ http://localhost:8000/queries.json
 <span class="n">response</span> <span class="o">=</span> <span 
class="n">client</span><span class="p">.</span><span 
class="nf">send_query</span><span class="p">(</span><span 
class="s1">'user'</span> <span class="o">=&gt;</span> <span 
class="s1">'i1'</span><span class="p">,</span> <span class="s1">'num'</span> 
<span class="o">=&gt;</span> <span class="mi">4</span><span class="p">)</span>
 
 <span class="nb">puts</span> <span class="n">response</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-fbb1d25e-8872-4c0a-822f-2086bff7aea1"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-c196a171-174b-417d-b179-fd7486e8a91e"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -578,7 +578,7 @@ http://localhost:8000/queries.json
     <span class="o">{</span><span class="s2">"item"</span>:<span 
class="s2">"i3"</span>,<span 
class="s2">"score"</span>:0.003007015026561692<span class="o">}</span>
   <span class="o">]</span>
 <span class="o">}</span>
-</pre></td></tr></tbody></table> </div> <p><em>MyECommerceRecommendation</em> 
is now running.</p><div class="alert-message info"><p>To update the model 
periodically with new data, simply set up a cron job to call <code>pio 
train</code> and <code>pio deploy</code>. The engine will continue to serve 
prediction results during the re-train process. After the training is 
completed, <code>pio deploy</code> will automatically shutdown the existing 
engine server and bring up a new process on the same port.</p></div><div 
class="alert-message info"><p><strong>Note that if you import a <em>large</em> 
data set</strong> and the training seems to be taking forever or getting stuck, 
it&#39;s likely that there is not enough executor memory. It&#39;s recommended 
to setup a Spark standalone cluster, you&#39;ll need to specify more driver and 
executor memory when training with a large data set. Please see <a 
href="/resources/faq/#engine-training">FAQ here</a> for instructions.</p></div> 
<h2 id='settin
 g-constraint-&quot;unavailableitems&quot;' class='header-anchors'>Setting 
constraint &quot;unavailableItems&quot;</h2><p>Now let&#39;s send a item 
contraint &quot;unavailableItems&quot; (replace accessKey with your Access 
Key):</p><div class="alert-message note"><p>You can also use SDK to send this 
event as decribed in the SDK sample above.</p></div><div class="tabs"> <ul 
class="control"> <li data-lang="json"><a 
href="#tab-1d1bff1d-778b-41c1-a82a-2b3151d17026">REST API</a></li> <li 
data-lang="python"><a href="#tab-37c5b4ac-080a-4d72-a462-8e8aee773561">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-535e6cd8-b13b-476e-9c4a-ff106a1d515f">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-6e78a2a6-94f1-4cbd-b0ee-11ae6ed8975f">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-6ee8f4a0-11ea-4f8e-a61a-326d7aafa0f3">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-1d1bff1d-778b-41c1-a82a-2b3151d17026"> <div class="highlight shell"> 
<table style="border-sp
 acing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre 
class="lineno">1
+</pre></td></tr></tbody></table> </div> <p><em>MyECommerceRecommendation</em> 
is now running.</p><div class="alert-message info"><p>To update the model 
periodically with new data, simply set up a cron job to call <code>pio 
train</code> and <code>pio deploy</code>. The engine will continue to serve 
prediction results during the re-train process. After the training is 
completed, <code>pio deploy</code> will automatically shutdown the existing 
engine server and bring up a new process on the same port.</p></div><div 
class="alert-message info"><p><strong>Note that if you import a <em>large</em> 
data set</strong> and the training seems to be taking forever or getting stuck, 
it&#39;s likely that there is not enough executor memory. It&#39;s recommended 
to setup a Spark standalone cluster, you&#39;ll need to specify more driver and 
executor memory when training with a large data set. Please see <a 
href="/resources/faq/#engine-training">FAQ here</a> for instructions.</p></div> 
<h2 id='settin
 g-constraint-&quot;unavailableitems&quot;' class='header-anchors'>Setting 
constraint &quot;unavailableItems&quot;</h2><p>Now let&#39;s send a item 
contraint &quot;unavailableItems&quot; (replace accessKey with your Access 
Key):</p><div class="alert-message note"><p>You can also use SDK to send this 
event as decribed in the SDK sample above.</p></div><div class="tabs"> <ul 
class="control"> <li data-lang="json"><a 
href="#tab-781f7259-e31b-4d5b-aabf-1610a2786a26">REST API</a></li> <li 
data-lang="python"><a href="#tab-59ecc806-ccd3-4aa6-921e-0d9539a3342b">Python 
SDK</a></li> <li data-lang="php"><a 
href="#tab-148ac2ca-5963-439c-9c46-9520f4d5d998">PHP SDK</a></li> <li 
data-lang="ruby"><a href="#tab-54f87ef4-e0a7-4b18-92ae-8ee3cc7c263a">Ruby 
SDK</a></li> <li data-lang="java"><a 
href="#tab-7d4c341f-e710-445c-a5a5-2d245f40a770">Java SDK</a></li> </ul> <div 
data-tab="REST API" data-lang="json" 
id="tab-781f7259-e31b-4d5b-aabf-1610a2786a26"> <div class="highlight shell"> 
<table style="border-sp
 acing: 0"><tbody><tr> <td class="gutter gl" style="text-align: right"><pre 
class="lineno">1
 2
 3
 4
@@ -599,7 +599,7 @@ http://localhost:8000/queries.json
   }
   "eventTime" : "2015-02-17T02:11:21.934Z"
 }'</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-37c5b4ac-080a-4d72-a462-8e8aee773561"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Python SDK" 
data-lang="python" id="tab-59ecc806-ccd3-4aa6-921e-0d9539a3342b"> <div 
class="highlight python"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -618,7 +618,7 @@ http://localhost:8000/queries.json
     <span class="s">"items"</span> <span class="p">:</span> <span 
class="p">[</span><span class="s">"&lt;ITEM ID1&gt;"</span><span 
class="p">,</span> <span class="s">"&lt;ITEM ID2&gt;"</span><span 
class="p">]</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-535e6cd8-b13b-476e-9c4a-ff106a1d515f"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="PHP SDK" 
data-lang="php" id="tab-148ac2ca-5963-439c-9c46-9520f4d5d998"> <div 
class="highlight php"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -635,7 +635,7 @@ http://localhost:8000/queries.json
   <span class="s1">'properties'</span> <span class="o">=&gt;</span> <span 
class="k">array</span><span class="p">(</span><span class="s1">'items'</span> 
<span class="o">=&gt;</span> <span class="k">array</span><span 
class="p">(</span><span class="s1">'&lt;ITEM ID1&gt;'</span><span 
class="p">,</span> <span class="s1">'&lt;ITEM ID2&gt;'</span><span 
class="p">))</span>
 <span class="p">));</span>
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-6e78a2a6-94f1-4cbd-b0ee-11ae6ed8975f"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Ruby SDK" 
data-lang="ruby" id="tab-54f87ef4-e0a7-4b18-92ae-8ee3cc7c263a"> <div 
class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -650,7 +650,7 @@ http://localhost:8000/queries.json
     <span class="s1">'properties'</span> <span class="o">=&gt;</span> <span 
class="p">{</span> <span class="s1">'items'</span> <span class="o">=&gt;</span> 
<span class="p">[</span><span class="s1">'&lt;ITEM ID1&gt;'</span><span 
class="p">,</span> <span class="s1">'&lt;ITEM ID2&gt;'</span><span 
class="p">]</span> <span class="p">}</span>
   <span class="p">}</span>
 <span class="p">)</span>
-</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-6ee8f4a0-11ea-4f8e-a61a-326d7aafa0f3"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div> <div data-tab="Java SDK" 
data-lang="java" id="tab-7d4c341f-e710-445c-a5a5-2d245f40a770"> <div 
class="highlight java"> <table style="border-spacing: 0"><tbody><tr> <td 
class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c5d52816/templates/ecommercerecommendation/quickstart/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/ecommercerecommendation/quickstart/index.html.gz 
b/templates/ecommercerecommendation/quickstart/index.html.gz
index c9ac758..30d59a5 100644
Binary files a/templates/ecommercerecommendation/quickstart/index.html.gz and 
b/templates/ecommercerecommendation/quickstart/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c5d52816/templates/ecommercerecommendation/train-with-rate-event/index.html.gz
----------------------------------------------------------------------
diff --git 
a/templates/ecommercerecommendation/train-with-rate-event/index.html.gz 
b/templates/ecommercerecommendation/train-with-rate-event/index.html.gz
index 27ade78..6b04b70 100644
Binary files 
a/templates/ecommercerecommendation/train-with-rate-event/index.html.gz and 
b/templates/ecommercerecommendation/train-with-rate-event/index.html.gz differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c5d52816/templates/javaecommercerecommendation/dase/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/javaecommercerecommendation/dase/index.html.gz 
b/templates/javaecommercerecommendation/dase/index.html.gz
index 26730e6..1533704 100644
Binary files a/templates/javaecommercerecommendation/dase/index.html.gz and 
b/templates/javaecommercerecommendation/dase/index.html.gz differ

Reply via email to