Coder Social home page Coder Social logo

predictionio-universal-recommender's Introduction

Inspectorio PredictionIO Image, modified by hgcho

  • OpenJDK 8
  • Scala 2.11.12
  • Apache PredictionIO 0.13.0
  • Apache Spark 2.1.1
  • PostgreSQL JDBC 42.2.0
  • Universal Recommender v0.7.3

Environments

PostgreSQL

  • PIO_DB_HOST: PostgreSQL server address
  • PIO_DB: PostgreSQL database name
  • PIO_DB_USER: PostgreSQL database user
  • PIO_DB_PASSWORD: PostgreSQL database password

Elasticsearch

  • ES_HOST: Elasticsearch host
  • ES_PORT: Elasticsearch port

Usage

$ docker-compose up -d

# open a new terminal and run below command to ssh into pio container
$ docker-compose exec app bash

$ pio status # check pio status
$ pio eventserver &> ~/eventserver.log &
$ pio app new **your-app-name-here** # specify the appName used in the template's engine.json file (you can see it in the current directory)
# integration test
$ cd ~/universal-recommender

# run eventserver if eventserver of pio runs yet
$ ./example/integration-test

# serve engine
$ pio deploy

# cURL test for serving engine

$ curl -H "Content-Type: application/json" -d '{ "user": "u1" }' http://localhost:9000/queries.json
# result example : {"itemScores":[{"item":"Nexus","score":0.18232156},{"item":"Surface","score":0.0}]}

$ curl -H "Content-Type: application/json" -d '{ "user": "U 2" }' http://localhost:9000/queries.json
# result example : {"itemScores":[{"item":"Iphone 4","score":0.87546873},{"item":"Ipad-retina","score":0.18232156},{"item":"Surface","score":0.0}]}

$ curl -H "Content-Type: application/json" -d '{ "item": "Ipad-retina" }' http://localhost:8000/queries.json
# result example : {"itemScores":[{"item":"Iphone 4","score":0.87546873},{"item":"Ipad-retina","score":0.18232156},{"item":"Surface","score":0.0}]}

Feed data through sdk and use pio train & pio deploy subsequently. Also, note that default UR integration tests are removed while building the container from scala source, and thus, can't be run.

predictionio-universal-recommender's People

Contributors

thuandt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.