From 9c195559df60beaf9486cbcd5ea5fd254721f8f4 Mon Sep 17 00:00:00 2001 From: Yuji Uchiyama Date: Wed, 28 Feb 2018 02:50:07 +0900 Subject: [PATCH] Update apriori documentation (#245) * Fix a wrong word * More precise description about support and confidence --- docs/machine-learning/association/apriori.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/machine-learning/association/apriori.md b/docs/machine-learning/association/apriori.md index 6f597be..bbf829b 100644 --- a/docs/machine-learning/association/apriori.md +++ b/docs/machine-learning/association/apriori.md @@ -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], ... ]