Phpml\Association\Apriori::frequency PHP Method

frequency() private method

Counts occurrences of $sample as subset in data pool.
See also: Phpml\Association\Apriori::samples
private frequency ( array $sample ) : integer
$sample array
return integer
    private function frequency(array $sample) : int
    {
        return count(array_filter($this->samples, function ($entry) use($sample) {
            return $this->subset($entry, $sample);
        }));
    }