Click or drag to resize
KNearest Class
http://www.emgu.com
The KNearest classifier
Inheritance Hierarchy

Namespace: Emgu.CV.ML
Assembly: Emgu.CV.ML (in Emgu.CV.ML.dll) Version: 3.0.0.2161 (3.0.0.2161)
Syntax
public class KNearest : UnmanagedObject, IStatModel, 
	IAlgorithm

The KNearest type exposes the following members.

Constructors
  NameDescription
Public methodKNearest
Create a default KNearest classifier
Top
Methods
  NameDescription
Public methodDispose
The dispose function that implements IDisposable interface
(Inherited from DisposableObject.)
Protected methodDisposeObject
Release the classifier and all the memory associated with it
(Overrides DisposableObjectDisposeObject.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Destructor
(Inherited from DisposableObject.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodReleaseManagedResources
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.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodClear
Clear the statistic model
(Defined by StatModelExtensions.)
Public Extension MethodPredict
Predicts response(s) for the provided sample(s)
(Defined by StatModelExtensions.)
Public Extension MethodRead
Reads algorithm parameters from a file storage.
(Defined by AlgorithmExtensions.)
Public Extension MethodSave
Save the statistic model to file
(Defined by StatModelExtensions.)
Public Extension MethodTrain(TrainData, Int32)Overloaded.
Trains the statistical model.
(Defined by StatModelExtensions.)
Public Extension MethodTrain(IInputArray, DataLayoutType, IInputArray)Overloaded.
Trains the statistical model.
(Defined by StatModelExtensions.)
Public Extension MethodWrite
Stores algorithm parameters in a file storage
(Defined by AlgorithmExtensions.)
Top
Fields
  NameDescription
Protected field_ptr
A pointer to the unmanaged object
(Inherited from UnmanagedObject.)
Top
Properties
  NameDescription
Public propertyAlgorithmType
Algorithm type
Public propertyDefaultK
Default number of neighbors to use in predict method
Public propertyEmax
Parameter for KDTree implementation
Public propertyIsClassifier
Whether classification or regression model should be trained
Public propertyPtr
Pointer to the unmanaged object
(Inherited from UnmanagedObject.)
Top
See Also