PHP Class Phpml\Clustering\DBSCAN

Inheritance: implements Phpml\Clustering\Clusterer
Mostra file Open project: php-ai/php-ml Class Usage Examples

Public Methods

Method Description
__construct ( float $epsilon = 0.5, integer $minSamples = 3, Phpml\Math\Distance $distanceMetric = null )
cluster ( array $samples ) : array

Private Methods

Method Description
expandCluster ( array $samples, array &$visited ) : array
getSamplesInRegion ( array $localSample, array $samples ) : array

Method Details

__construct() public method

public __construct ( float $epsilon = 0.5, integer $minSamples = 3, Phpml\Math\Distance $distanceMetric = null )
$epsilon float
$minSamples integer
$distanceMetric Phpml\Math\Distance

cluster() public method

public cluster ( array $samples ) : array
$samples array
return array