PHP 클래스 Phpml\Classification\KNearestNeighbors

상속: implements Classifier, use trait Phpml\Helper\Trainable, use trait Phpml\Helper\Predictable
파일 보기 프로젝트 열기: php-ai/php-ml 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( integer $k = 3, Phpml\Math\Distance $distanceMetric = null )

보호된 메소드들

메소드 설명
predictSample ( array $sample ) : mixed

비공개 메소드들

메소드 설명
kNeighborsDistances ( array $sample ) : array

메소드 상세

__construct() 공개 메소드

public __construct ( integer $k = 3, Phpml\Math\Distance $distanceMetric = null )
$k integer
$distanceMetric Phpml\Math\Distance (if null then Euclidean distance as default)

predictSample() 보호된 메소드

protected predictSample ( array $sample ) : mixed
$sample array
리턴 mixed