By endroid
This bundle provides easy integration with PredictionIO. PredictionIO is an open source machine
learning server for software developers to create predictive features, such as personalization, recommendation and content
discovery. Based on Apache Mahout scalable machine learning libraries.
The bundle registers the Endroid PredictionIO client as a service in your
Symfony project. This client can then be used to register actions between users and items and to retrieve recommendations
provided by any PredictionIO server. Applications range from showing recommended products in a web shop to discovering
relevant experts in a social collaboration network.
- Symfony
- Dependencies:
endroid/PredictionIO
{
"require": {
"endroid/prediction-io-bundle": "dev-master"
}
}$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update endroid/prediction-io-bundleComposer will install the bundle to your project's vendor/endroid directory.
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Endroid\Bundle\PredictionIOBundle\EndroidPredictionIOBundle(),
);
}endroid_prediction_io:
app_key: "Your app key"
api_url: "http://localhost:8000" // optionalAfter installation and configuration, the service can be directly referenced from within your controllers.
<?php
public function recommendAction()
{
$client = $this->get('endroid.prediction_io');
// populate
$client->createUser($userId);
$client->createItem($itemId);
$client->recordAction($userId, $itemId, 'view');
// get recommendations and similar items
$recommendations = $client->getRecommendations($userId, $engine, $count);
$similarItems = $client->getSimilarItems($itemId, $engine, $count);
}PredictionIO provides a Vagrant box
containing an out-of-the-box PredictionIO server.
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.


