Package org.apache.lucene.classification
Class ClassificationResult<T>
java.lang.Object
org.apache.lucene.classification.ClassificationResult<T>
- All Implemented Interfaces:
Comparable<ClassificationResult<T>>
The result of a call to
Classifier.assignClass(String) holding an assigned class of type
T and a score.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintretrieve the result classdoublegetScore()retrieve the result score
-
Field Details
-
assignedClass
-
score
private final double score
-
-
Constructor Details
-
ClassificationResult
Constructor- Parameters:
assignedClass- the classTassigned by aClassifierscore- the score for the assignedClass as adouble
-
-
Method Details
-
getAssignedClass
retrieve the result class- Returns:
- a
Trepresenting an assigned class
-
getScore
public double getScore()retrieve the result score- Returns:
- a
doublerepresenting a result score
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-