All Projects → apache → predictionio-sdk-ruby

apache / predictionio-sdk-ruby

Licence: Apache-2.0 license
PredictionIO Ruby SDK

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to predictionio-sdk-ruby

predictionio-template-ecom-recommender
PredictionIO E-Commerce Recommendation Engine Template (Scala-based parallelized engine)
Stars: ✭ 73 (-61.98%)
Mutual labels:  big-data, predictionio
predictionio-sdk-java
PredictionIO Java SDK
Stars: ✭ 107 (-44.27%)
Mutual labels:  big-data, predictionio
predictionio-template-recommender
PredictionIO Recommendation Engine Template (Scala-based parallelized engine)
Stars: ✭ 80 (-58.33%)
Mutual labels:  big-data, predictionio
predictionio-template-java-ecom-recommender
PredictionIO E-Commerce Recommendation Engine Template (Java-based parallelized engine)
Stars: ✭ 36 (-81.25%)
Mutual labels:  big-data, predictionio
predictionio-template-similar-product
PredictionIO Similar Product Engine Template (Scala-based parallelized engine)
Stars: ✭ 50 (-73.96%)
Mutual labels:  big-data, predictionio
predictionio
PredictionIO, a machine learning server for developers and ML engineers.
Stars: ✭ 12,510 (+6415.63%)
Mutual labels:  big-data, predictionio
predictionio-sdk-python
PredictionIO Python SDK
Stars: ✭ 199 (+3.65%)
Mutual labels:  big-data, predictionio
predictionio-sdk-php
PredictionIO PHP SDK
Stars: ✭ 269 (+40.1%)
Mutual labels:  big-data, predictionio
predictionio-template-attribute-based-classifier
PredictionIO Classification Engine Template (Scala-based parallelized engine)
Stars: ✭ 38 (-80.21%)
Mutual labels:  big-data, predictionio
Attic Predictionio
PredictionIO, a machine learning server for developers and ML engineers.
Stars: ✭ 12,522 (+6421.88%)
Mutual labels:  big-data, predictionio
Lite Virtual List
Virtual list component library supporting waterfall flow based on vue
Stars: ✭ 223 (+16.15%)
Mutual labels:  big-data
Books
整理一些书籍 ,包含 C&C++ 、git 、Java、Keras 、Linux 、NLP 、Python 、Scala 、TensorFlow 、大数据 、推荐系统、数据库、数据挖掘 、机器学习 、深度学习 、算法等。
Stars: ✭ 222 (+15.63%)
Mutual labels:  big-data
Cboard
An easy to use, self-service open BI reporting and BI dashboard platform.
Stars: ✭ 2,795 (+1355.73%)
Mutual labels:  big-data
Nakedtensor
Bare bone examples of machine learning in TensorFlow
Stars: ✭ 2,443 (+1172.4%)
Mutual labels:  big-data
Data Accelerator
Data Accelerator for Apache Spark simplifies onboarding to Streaming of Big Data. It offers a rich, easy to use experience to help with creation, editing and management of Spark jobs on Azure HDInsights or Databricks while enabling the full power of the Spark engine.
Stars: ✭ 247 (+28.65%)
Mutual labels:  big-data
Usql
U-SQL Examples and Issue Tracking
Stars: ✭ 221 (+15.1%)
Mutual labels:  big-data
Gimel
Big Data Processing Framework - Unified Data API or SQL on Any Storage
Stars: ✭ 216 (+12.5%)
Mutual labels:  big-data
Awkward 0.x
Manipulate arrays of complex data structures as easily as Numpy.
Stars: ✭ 216 (+12.5%)
Mutual labels:  big-data
acousticbrainz-server
The server components for the AcousticBrainz project
Stars: ✭ 128 (-33.33%)
Mutual labels:  big-data
Clickhouse
ClickHouse® is a free analytics DBMS for big data
Stars: ✭ 21,089 (+10883.85%)
Mutual labels:  big-data

Apache PredictionIO Ruby SDK

Build Status Gem Version

The Ruby SDK provides a convenient wrapper for PredictionIO Event Server API and Engine API. It allows you to quickly record your users' behavior and retrieve personalized predictions for them.

Documentation

Full Ruby SDK documentation can be found here.

Please see the PredictionIO App Integration Overview to understand how the SDK can be used to integrate PredictionIO Event Server and Engine with your application.

Installation

Ruby 2+ required!

The module is published to RubyGems and can be installed directly by:

gem install predictionio

Or using Bundler with:

gem 'predictionio', '0.12.1'

Sending Events to Event Server

Please refer to Event Server documentation for event format and how the data can be collected from your app.

Instantiate Event Client and connect to PredictionIO Event Server

require 'predictionio'

# Define environment variables.
ENV['PIO_THREADS'] = '50' # For async requests.
ENV['PIO_EVENT_SERVER_URL'] = 'http://localhost:7070'
ENV['PIO_ACCESS_KEY'] = 'YOUR_ACCESS_KEY' # Find your access key with: `$ pio app list`.

# Create PredictionIO event client.
client = PredictionIO::EventClient.new(ENV['PIO_ACCESS_KEY'], ENV['PIO_EVENT_SERVER_URL'], Integer(ENV['PIO_THREADS']))

Create a $set user event and send it to Event Server

client.create_event(
  '$set',
  'user',
  user_id
)

Create a $set item event and send it to Event Server

client.create_event(
  '$set',
  'item',
  item_id,
  { 'properties' => { 'categories' => ['Category 1', 'Category 2'] } }
)

Create a $set item event and send it to Event Server to specific channel

NOTE: channels are supported in PIO version >= 0.9.2 only. Channel must be created first.

client.create_event(
  '$set',
  'item',
  item_id,
  { 'properties' => { 'categories' => ['Category 1', 'Category 2'], 'channel' => 'test-channel'} }
)

Create a user 'rate' item event and send it to Event Server

client.create_event(
  'rate',
  'user',
  user_id, {
    'targetEntityType' => 'item',
    'targetEntityId' => item_id,
    'properties' => { 'rating' => 10 }
  }
)

Asynchronous request

To send an async request, simply use the acreate_event method instead of create_event. Be aware that the asynchronous method does not throw errors. It's best to use the synchronous method when first getting started.

Query PredictionIO Engine

Connect to the Engine:

# Define environmental variables.
ENV['PIO_ENGINE_URL'] = 'http://localhost:8000'

# Create PredictionIO engine client.
client = PredictionIO::EngineClient.new(ENV['PIO_ENGINE_URL'])

Send a prediction query to the engine and get the predicted result:

# Get 5 recommendations for items similar to 10, 20, 30.
response = client.send_query(items: [10, 20, 30], num: 5)

Mailing List

Please use the Apache mailing lists. Subscription instructions are here.

Issue Tracker

Use the Apache JIRA, and file any issues under the Ruby SDK component.

Contributing

Please follow these instructions.

License

Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].