File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,9 +13,21 @@ Collaborative filtering recommendation system
1313 ``` php
1414 //Somewhere in your project, you may need to use autoload
1515 include __DIR__ ."/vendor/autoload.php";
16-
1716 ```
1817
18+ ### Introduction
19+ Recommend a product using collaborative filtering
20+ ``` php
21+ /**
22+ $table gets the array from the database.
23+ $user is the foreign key that represents the user who will receive the recommendation.
24+ **/
25+ use Tigo\Recommend; // import class
26+ $client = new Recommend();
27+ $client->ranking($table,$user) // Get Ranking algorithm using likes/dislikes
28+ $client->euclidean($table,$user,0); // It is recommended to use this algorithm in "star-based rating"
29+ ```
30+
1931### Configuration
2032Sometimes, it may be necessary to rename the value of the constants (According to your database table).
2133
You can’t perform that action at this time.
0 commit comments