Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

predictable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

predictable

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Predictable

Predictable is a Ruby DSL for Prediction.io, an open source machine learning server built on top of Hadoop. It makes it easy to implement predictive features such as personalization, recommendations, and content discovery in your Ruby/Rails application.

Installation

Add this line to your application's Gemfile:

gem 'predictable'

And then execute:

$ bundle

Or install it yourself as:

$ gem install predictable

Usage

Include Predictable::User in your application's User model.

class User < ActiveRecord::Base
  include Predictable::User

  ...
end

Include the Predictable::Item in the models of the items you want to recommend.

class Offer < ActiveRecord::Base
  include Predictable::Item

  ...
end

Get 10 recommended items for a user.

Offer.recommended_for(user, 10)

Get 10 items most similar to an existing item.

Offer.similar_to(offer, 10)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 23 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc