@@ -19,7 +19,10 @@ Collaborative filtering recommendation system
1919 //Somewhere in your project, you may need to use autoload
2020 include __DIR__ ."/vendor/autoload.php";
2121 ```
22-
22+ ### Algorithms
23+ - ranking
24+ - euclidean
25+ - slope one
2326### Introduction
2427Recommend a product using collaborative filtering
2528``` php
@@ -29,8 +32,9 @@ Recommend a product using collaborative filtering
2932 **/
3033 use Tigo\Recommendation\Recommend; // import class
3134 $client = new Recommend();
32- $client->ranking($table,$user) //optional third parameter refers to the score not accepted
33- $client->euclidean($table,$user); //optional third parameter refers to the minimum accepted score
35+ $client->ranking($table,$user); //optional third parameter refers to the score not accepted
36+ $client->euclidean($table,$user); //optional third parameter refers to the minimum accepted score
37+ $client->slopeOne($table, $user); //optional third parameter refers to the minimum accepted score
3438```
3539
3640### Configuration
@@ -80,6 +84,9 @@ A simple didactic demonstration of the algorithm
8084
8185 print_r($client->euclidean($table,"Pedro")); // result = ['C' => 1]
8286 print_r($client->euclidean($table,"Pedro", 2)); // result = [] ;
87+
88+ print_r($client->slopeOne($table,'Pedro')); // result = ['C' => 1]
89+ print_r($client->slopeOne($table,'Pedro', 2)); // result = []
8390```
8491### License
8592MIT license. See the archive [ License] ( https://github.com/tigoCaval/recommendation-algorithm/blob/main/LICENSE )
0 commit comments