Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
Phpml\Association\Apriori Class Reference
Inheritance diagram for Phpml\Association\Apriori:
Phpml\Association\Associator Phpml\Estimator

Public Member Functions

 __construct (float $support=0.0, float $confidence=0.0)
 Apriori constructor.
 
 apriori ()
 Generates frequent item sets.
 
 getRules ()
 Get all association rules which are generated for every k-length frequent item set.
 
 predict (array $samples)
 
 train (array $samples, array $targets)
 

Public Attributes

const ARRAY_KEY_ANTECEDENT = 'antecedent'
 
const ARRAY_KEY_CONFIDENCE = 'confidence'
 
const ARRAY_KEY_CONSEQUENT = 'consequent'
 
const ARRAY_KEY_SUPPORT = 'support'
 

Protected Member Functions

 predictSample (array $sample)
 

Member Function Documentation

◆ apriori()

Phpml\Association\Apriori::apriori ( )

Generates frequent item sets.

Return values
mixed[][][]

◆ getRules()

Phpml\Association\Apriori::getRules ( )

Get all association rules which are generated for every k-length frequent item set.

Return values
mixed[][]

◆ predict()

Phpml\Estimator::predict ( array $samples)
inherited

Implemented in Phpml\Pipeline.

◆ predictSample()

Phpml\Association\Apriori::predictSample ( array $sample)
protected
Parameters
mixed[]$sample
Return values
mixed[][]

◆ train()

Phpml\Estimator::train ( array $samples,
array $targets )
inherited

The documentation for this class was generated from the following file: