mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-21 20:45:10 +00:00
Update apriori documentation (#245)
* Fix a wrong word * More precise description about support and confidence
This commit is contained in:
parent
d188790276
commit
9c195559df
@ -4,8 +4,8 @@ Association rule learning based on [Apriori algorithm](https://en.wikipedia.org/
|
||||
|
||||
### Constructor Parameters
|
||||
|
||||
* $support - [confidence](https://en.wikipedia.org/wiki/Association_rule_learning#Support), minimum relative amount of frequent item set in train sample
|
||||
* $confidence - [confidence](https://en.wikipedia.org/wiki/Association_rule_learning#Confidence), minimum relative amount of item set in frequent item sets
|
||||
* $support - minimum threshold of [support](https://en.wikipedia.org/wiki/Association_rule_learning#Support), i.e. the ratio of samples which contain both X and Y for a rule "if X then Y"
|
||||
* $confidence - minimum threshold of [confidence](https://en.wikipedia.org/wiki/Association_rule_learning#Confidence), i.e. the ratio of samples containing both X and Y to those containing X
|
||||
|
||||
```
|
||||
use Phpml\Association\Apriori;
|
||||
@ -44,7 +44,7 @@ $associator->predict([['alpha','epsilon'],['beta','theta']]);
|
||||
### Associating
|
||||
|
||||
Get generated association rules simply use `rules` method.
|
||||
|
||||
|
||||
```
|
||||
$associator->getRules();
|
||||
// return [['antecedent' => ['alpha', 'theta'], 'consequent' => ['beta'], 'support' => 1.0, 'confidence' => 1.0], ... ]
|
||||
|
Loading…
Reference in New Issue
Block a user