Class KNearestNeighborClassifier
A k-Nearest Neighbor classifier (see
http://en.wikipedia.org/wiki/K-nearest_neighbors
) based
on MoreLikeThis
@lucene.experimental
Inheritance
System.Object
KNearestNeighborClassifier
Assembly: Lucene.Net.Classification.dll
Syntax
public class KNearestNeighborClassifier : object, IClassifier<BytesRef>
Constructors
Name | Description |
---|---|
KNearestNeighborClassifier(Int32) | Create a IClassifier<T> using kNN algorithm |
KNearestNeighborClassifier(Int32, Int32, Int32) | Create a IClassifier<T> using kNN algorithm |
Methods
Name | Description |
---|---|
AssignClass(String) | Assign a class (with score) to the given text string |
Train(AtomicReader, String, String, Analyzer) | Train the classifier using the underlying Lucene index |
Train(AtomicReader, String, String, Analyzer, Query) | Train the classifier using the underlying Lucene index |
Train(AtomicReader, String[], String, Analyzer, Query) | Train the classifier using the underlying Lucene index |