public function getRules() : array
{
if (!$this->large) {
$this->large = $this->apriori();
}
if ($this->rules) {
return $this->rules;
}
$this->rules = [];
$this->generateAllRules();
return $this->rules;
}
public function testGetRules() { $apriori = new Apriori(0.4, 0.8); $apriori->train($this->sampleChars, []); $this->assertCount(19, $apriori->getRules()); }