PredictionIO Product Ranking Engine Template (Scala-based parallelized engine)
Scala Python
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data Add send_query sample script and misc cleanup Feb 5, 2015
project Rename pio sbt plugin file to pio-build.sbt Mar 4, 2015
src/main/scala PDIO-617 update to use appName as param new PEventStore API Apr 17, 2015
.gitignore
README.md Fixed the documentation link Sep 13, 2017
build.sbt Update for PredictionIO 0.9.2 Apr 15, 2015
engine.json PDIO-617 update to use appName as param new PEventStore API Apr 17, 2015
template.json Update for PredictionIO 0.9.2 Apr 15, 2015

README.md

Product Ranking Engine Template

Documentation

Please refer to http://predictionio.incubator.apache.org/templates/productranking/quickstart/

Version

v0.3.0

  • update for PredictionIO 0.9.2, including:

    • use new PEventStore API
    • use appName in DataSource parameter

v0.2.0

  • update build.sbt and template.json for PredictionIO 0.9.2

v0.1.1

  • update for PredictionIO 0.9.0

v0.1.0

  • initial version

Development Notes

import sample data

$ python data/import_eventserver.py --access_key <your access key>

query

normal:

curl -H "Content-Type: application/json" \
-d '{ "user": "u2", "items": ["i1", "i3", "i10", "i2", "i5", "i31", "i9"]}' \
http://localhost:8000/queries.json \
-w %{time_connect}:%{time_starttransfer}:%{time_total}

unknown user:

curl -H "Content-Type: application/json" \
-d '{ "user": "unknown_user", "items": ["i1", "i3", "i10", "i2", "i5", "i31", "i9"]}' \
http://localhost:8000/queries.json \
-w %{time_connect}:%{time_starttransfer}:%{time_total}

unknown item:

curl -H "Content-Type: application/json" \
-d '{ "user": "u3", "items": ["unk1", "i3", "i10", "i2", "i9"]}' \
http://localhost:8000/queries.json \
-w %{time_connect}:%{time_starttransfer}:%{time_total}

all unknown items:

curl -H "Content-Type: application/json" \
-d '{ "user": "u4", "items": ["unk1", "unk2", "unk3", "unk4"]}' \
http://localhost:8000/queries.json \
-w %{time_connect}:%{time_starttransfer}:%{time_total}