module Predictable

Constants

VERSION

Public Class Methods

client() click to toggle source
# File lib/predictable.rb, line 16
def client
  @client ||= PredictionIO::Client.new(
    config[:app_key],
    config[:threads],
    config[:api_url],
    config[:api_version]
  )
end
config() click to toggle source
# File lib/predictable.rb, line 25
def config
  @config ||= default_config
end
config=(new_config) click to toggle source
# File lib/predictable.rb, line 29
def config=(new_config)
  config.merge!(new_config)
end
default_config() click to toggle source
# File lib/predictable.rb, line 8
def default_config
  {
    :api_url     => "http://localhost:8000",
    :threads     => 10,
    :api_version => ""
  }.dup
end
engines() click to toggle source
# File lib/predictable.rb, line 33
def engines
  {
    :recommendation_engine => config[:recommendation_engine],
    :similarity_engine => config[:similarity_engine]
  }
end