Package org.apache.lucene.classification
Class ClassificationResult<T>
- java.lang.Object
-
- org.apache.lucene.classification.ClassificationResult<T>
-
- All Implemented Interfaces:
Comparable<ClassificationResult<T>>
public class ClassificationResult<T> extends Object implements Comparable<ClassificationResult<T>>
The result of a call toClassifier.assignClass(String)holding an assigned class of typeTand a score.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description ClassificationResult(T assignedClass, double score)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ClassificationResult<T> o)TgetAssignedClass()retrieve the result classdoublegetScore()retrieve the result score
-
-
-
Constructor Detail
-
ClassificationResult
public ClassificationResult(T assignedClass, double score)
Constructor- Parameters:
assignedClass- the classTassigned by aClassifierscore- the score for the assignedClass as adouble
-
-
Method Detail
-
getAssignedClass
public T 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
public int compareTo(ClassificationResult<T> o)
- Specified by:
compareToin interfaceComparable<T>
-
-