<commit_before>Endroid PredictionIO
====================

*By [endroid](http://endroid.nl/)*

[![Build Status](https://secure.travis-ci.org/endroid/PredictionIO.png)](http://travis-ci.org/endroid/PredictionIO)
[![Latest Stable Version](https://poser.pugx.org/endroid/prediction-io/v/stable.png)](https://packagist.org/packages/endroid/prediction-io)
[![Total Downloads](https://poser.pugx.org/endroid/prediction-io/downloads.png)](https://packagist.org/packages/endroid/prediction-io)

The Endroid 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`](http://prediction.io/) recommendation engine.
Applications range from showing recommended products in a web shop to discovering relevant experts in a social
collaboration network.

## Requirements

* Symfony
* Dependencies:
 * [`PredictionIO-PHP-SDK`](https://github.com/PredictionIO/PredictionIO-PHP-SDK)

## Usage

```php
<?php

$client = new Endroid\PredictionIO\PredictionIO($appKey, $apiUrl);

// populate with users, items and actions
$client->createUser($userId);<commit_msg>Minor change<commit_after>Endroid PredictionIO
====================

*By [endroid](http://endroid.nl/)*

[![Build Status](https://secure.travis-ci.org/endroid/PredictionIO.png)](http://travis-ci.org/endroid/PredictionIO)
[![Latest Stable Version](https://poser.pugx.org/endroid/prediction-io/v/stable.png)](https://packagist.org/packages/endroid/prediction-io)
[![Total Downloads](https://poser.pugx.org/endroid/prediction-io/downloads.png)](https://packagist.org/packages/endroid/prediction-io)

The Endroid 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`](http://prediction.io/) recommendation engine. Applications range from showing recommended products in a
web shop to discovering relevant experts in a social collaboration network.

## Requirements

* Symfony
* Dependencies:
 * [`PredictionIO-PHP-SDK`](https://github.com/PredictionIO/PredictionIO-PHP-SDK)

## Usage

```php
<?php

$client = new Endroid\PredictionIO\PredictionIO($appKey, $apiUrl);

// populate with users, items and actions
$client->createUser($userId);
{'fraction_non_alphanumeric': 0.12111184645929848, 'fraction_numerical': 0.0, 'mean_word_length': 5.917620137299771, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6997158', 'n_tokens_mistral': 854, 'n_tokens_neox': 826, 'n_words': 252}