1. Go to this page and download the library: Download bratao/prediction-io library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// 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);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.