C# 클래스 OpenCvSharp.ML.KNearest

K nearest neighbors classifier
상속: StatModel
파일 보기 프로젝트 열기: shimat/opencvsharp

공개 메소드들

메소드 설명
Create ( ) : KNearest

Creates the empty model

FindNearest ( InputArray samples, int k, OutputArray results, OutputArray neighborResponses = null, OutputArray dist = null ) : float

Finds the neighbors and predicts responses for input vectors.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Clean up any resources being used.

KNearest ( IntPtr p ) : System

Creates instance by raw pointer cv::ml::KNearest*

메소드 상세

Create() 공개 정적인 메소드

Creates the empty model
public static Create ( ) : KNearest
리턴 KNearest

Dispose() 보호된 메소드

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. ///
리턴 void

FindNearest() 공개 메소드

Finds the neighbors and predicts responses for input vectors.
public FindNearest ( InputArray samples, int k, OutputArray results, OutputArray neighborResponses = null, OutputArray dist = null ) : float
samples InputArray Input samples stored by rows. /// It is a single-precision floating-point matrix of `[number_of_samples] * k` size.
k int Number of used nearest neighbors. Should be greater than 1.
results OutputArray Vector with results of prediction (regression or classification) for each /// input sample. It is a single-precision floating-point vector with `[number_of_samples]` elements.
neighborResponses OutputArray neighborResponses Optional output values for corresponding neighbors. /// It is a single-precision floating-point matrix of `[number_of_samples] * k` size.
dist OutputArray Optional output distances from the input vectors to the corresponding neighbors. /// It is a single-precision floating-point matrix of `[number_of_samples] * k` size.
리턴 float

KNearest() 보호된 메소드

Creates instance by raw pointer cv::ml::KNearest*
protected KNearest ( IntPtr p ) : System
p System.IntPtr
리턴 System