Created
September 25, 2014 10:20
-
-
Save Nathan-Srivi/21aab21cbdf41f1349d2 to your computer and use it in GitHub Desktop.
prediction io show page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php session_start(); | |
require_once("vendor/autoload.php"); | |
use PredictionIO\PredictionIOClient; | |
$client = PredictionIOClient::factory(array("appkey" => "6DzhlG31iEHRo1ThUeIswYoXBHYq825Xg8d8ZooUymdXVLBOvbWRBCyCIhfLEAhs")); | |
try{ | |
$user_id = 6; | |
$client->identify($user_id); | |
$command = $client->getCommand('itemrec_get_top_n', array('pio_engine' => 'movie-recommender', 'pio_n' => 9)); | |
$recommended_movies_raw = $client->execute($command); | |
echo "<pre>"; | |
print_r( $recommended_movies_raw); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment