The KNearest classifier

Namespace: Emgu.CV.ML
Assembly: Emgu.CV.ML (in Emgu.CV.ML.dll) Version: 2.2.1.1150 (2.2.1.1150)

Syntax

         
 C#  Visual Basic  Visual C++ 
public class KNearest : StatModel
Public Class KNearest _
	Inherits StatModel
public ref class KNearest : public StatModel

Members

               
 All Members  Constructors   Fields   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
KNearest()()()()
Create a default KNearest classifier
KNearest(Matrix<(Of <<'(Single>)>>), Matrix<(Of <<'(Single>)>>), Matrix<(Of <<'(Byte>)>>), Boolean, Int32)
Creaet a KNearest classifier using the specific traing data
_ptr
A pointer to the unmanaged object
(Inherited from UnmanagedObject.)
Clear()()()()
Clear the statistic model
(Inherited from StatModel.)
Dispose()()()()
The dispose function that implements IDisposable interface
(Inherited from DisposableObject.)
DisposeObject()()()()
Release the classifer and all the memory associated with it
(Overrides DisposableObject..::..DisposeObject()()()().)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Destructor
(Inherited from DisposableObject.)
FindNearest(Matrix<(Of <<'(Single>)>>), Int32, Matrix<(Of <<'(Single>)>>), Matrix<(Of <<'(Single>)>>), Matrix<(Of <<'(Single>)>>), Matrix<(Of <<'(Single>)>>))
For each input vector (which are rows of the matrix samples) the method finds k <= get_max_k() nearest neighbor. In case of regression, the predicted result will be a mean value of the particular vector's neighbor responses. In case of classification the class is determined by voting.
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Load(String)
Load the statistic model from file
(Inherited from StatModel.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Ptr
Pointer to the unmanaged object
(Inherited from UnmanagedObject.)
ReleaseManagedResources()()()()
Release the managed resources. This function will be called during the disposal of the current object. override ride this function if you need to call the Dispose() function on any managed IDisposable object created by the current object
(Inherited from DisposableObject.)
Save(String)
Save the statistic model to file
(Inherited from StatModel.)
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Train(Matrix<(Of <<'(Single>)>>), Matrix<(Of <<'(Single>)>>), Matrix<(Of <<'(Byte>)>>), Boolean, Int32, Boolean)
Update the KNearest classifier using the specific traing data.

Inheritance Hierarchy

See Also