File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ Recommend a product using collaborative filtering
2424 **/
2525 use Tigo\Recommend; // import class
2626 $client = new Recommend();
27- $client->ranking($table,$user)
28- $client->euclidean($table,$user,0);
27+ $client->ranking($table,$user) //optional third parameter refers to the score not accepted
28+ $client->euclidean($table,$user); //optional third parameter refers to the minimum accepted score
2929```
3030
3131### Configuration
@@ -71,7 +71,9 @@ A simple didactic demonstration of the algorithm
7171 use Tigo\Recommend; // import class
7272 $client = new Recommend();
7373 print_r($client->ranking($table,"Pedro")); // result = ['C' => 2]
74- print_r($client->euclidean($table,"Pedro", 0)); // result = ['C' => 1]
74+ print_r($client->ranking($t->get(),"Pedro",1)); // result = [];
75+
76+ print_r($client->euclidean($table,"Pedro")); // result = ['C' => 1]
7577 /**third parameter determines the lowest accepted score**/
7678 print_r($client->euclidean($table,"Pedro", 2)); // result = [] ;
7779```
You can’t perform that action at this time.
0 commit comments