GithubHelp home page GithubHelp logo

predictionio's Introduction

Laravel PredictionIO

Based on endroid

The Laravel PredictionIO library provides a client which offers easy access to a PredictionIO recommendation engine. PredictionIO is an open source machine learning server for software developers to create predictive features, such as personalization, recommendation and content discovery.

Through a small set of simple calls, all server functionality is exposed to your application. You can add users and items, register actions between these users and items and retrieve recommendations deduced from this information by any PredictionIO recommendation engine. Applications range from showing recommended products in a web shop to discovering relevant experts in a social collaboration network.

Installation

  • Install library and dependencies:
$ composer require "bratao/prediction-io:1.*@dev"
  • Add a provider in app/config/app.php:
    'Bratao\PredictionIO\PredictionServiceProvider'
  • Add an alias in app/config/app.php:
    'Prediction'      => 'Bratao\PredictionIO\Facade',
	'predictionio' => array(
		'api' => 'http://localhost:8000/',
		'key' => '0250b3f85ce33284f77c77f36b41010ef2c4fc5c',
	),

Usage

<?php

// populate with users, items and actions
Prediction::createUser($userId);
Prediction::createItem($itemId);
Prediction::recordAction($userId, $itemId, 'view');

//Get a User or a Item
$item = Prediction::getUser($userId);
$user = Prediction::getItem($itemId);

//Delete a user or a item
Prediction::deleteUser($userId);
Prediction::deleteItem($itemId);

// get recommendations and similar items
$recommendations = Prediction::getRecommendations($userId, $engine, $count);
$similarItems = Prediction::getSimilarItems($itemId, $engine, $count);

License

This bundle is under the MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

Thanks to

  • Braunson Yager
  • Laurent Goussard

predictionio's People

Contributors

endroid avatar loranger avatar braunson avatar

Stargazers

Bilal Khilji avatar Joe Sebastian avatar  avatar Tiberiu Boros avatar FaRooQ Khan avatar dandisy avatar Ryan Chan avatar Olga avatar Spiros Gerokostas avatar  avatar Federico Stango avatar Cody avatar Jelle Van de Vliet avatar Michael Hopkins avatar Melvin Valster avatar Fabio avatar Serhat Durum avatar  avatar wrglbr avatar Niels Stampe avatar Bruno Cabral avatar Dennis Oderwald avatar Terion avatar Charles Soetan avatar

Watchers

James Cloos avatar Bruno Cabral avatar Michael Hopkins 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.