Skip to content

Commit fbf46f1

Browse files
authored
Update README.md
1 parent 1185e3d commit fbf46f1

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff 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
2032
Sometimes, it may be necessary to rename the value of the constants (According to your database table).
2133

0 commit comments

Comments
 (0)