Package org.jpmml.evaluator
Interface HasAffinity
-
- All Superinterfaces:
CategoricalResultFeature<java.lang.String>,ResultFeature
- All Known Subinterfaces:
HasAffinityRanking
- All Known Implementing Classes:
AffinityDistribution,ClusterAffinityDistribution
public interface HasAffinity extends CategoricalResultFeature<java.lang.String>
A marker interface for classification or clustering results that provide an affinity distribution.
Affinity represents a degree of attraction between the sample and a particular category.
PMML deals with two kinds of affinities:- Distance between two points in an n-dimensional feature space. Smaller distance values indicate more optimal fit.
- Similarity between two feature vectors. Greater similarity values indicate more optimal fit.
- See Also:
ResultFeature.AFFINITY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.DoublegetAffinity(java.lang.String category)Gets the affinity towards the specified category.ReportgetAffinityReport(java.lang.String category)-
Methods inherited from interface org.jpmml.evaluator.CategoricalResultFeature
getCategories
-
-
-
-
Method Detail
-
getAffinity
java.lang.Double getAffinity(java.lang.String category)
Gets the affinity towards the specified category.
- Returns:
- An affinity in the range from 0.0 to positive infinity.
The affinity of an unknown category is the least optimal value in the range of valid values (ie.
Double.POSITIVE_INFINITYfor distance measures and 0.0 for similarity measures). - See Also:
CategoricalResultFeature.getCategories()
-
getAffinityReport
Report getAffinityReport(java.lang.String category)
- See Also:
CategoricalResultFeature.getCategories()
-
-