public class AffinityDistribution extends Classification implements HasEntityIdRanking, HasAffinityRanking, HasEntityAffinity
Classification.Type| Modifier | Constructor and Description |
|---|---|
protected |
AffinityDistribution(Classification.Type type,
Object result) |
| Modifier and Type | Method and Description |
|---|---|
Double |
getAffinity(String id)
Gets the affinity towards the specified category.
|
List<Double> |
getAffinityRanking()
Gets the affinities for known categories.
|
Set<String> |
getCategoryValues()
Gets the set of known categories.
|
Double |
getEntityAffinity()
Gets the affinity towards the winning entity.
|
String |
getEntityId()
Gets the
Entity identifier. |
List<String> |
getEntityIdRanking() |
protected static Classification.Type |
validateType(Classification.Type type) |
entryKeys, entryValues, getResult, getType, normalize, normalizeSoftMax, sum, toString, toStringHelperprotected AffinityDistribution(Classification.Type type, Object result)
public Set<String> getCategoryValues()
CategoricalResultFeatureGets the set of known categories.
The set of known categories either equals the set of all categories, or is a proper subset of it.
getCategoryValues in interface CategoricalResultFeaturepublic String getEntityId()
HasEntityId
Gets the Entity identifier.
getEntityId in interface HasEntityIdpublic List<String> getEntityIdRanking()
getEntityIdRanking in interface HasEntityIdRankingpublic Double getAffinity(String id)
HasAffinityGets the affinity towards the specified category.
getAffinity in interface HasAffinityDouble.POSITIVE_INFINITY for distance measures and 0.0 for similarity measures).CategoricalResultFeature.getCategoryValues()public List<Double> getAffinityRanking()
HasAffinityRankingGets the affinities for known categories.
Affinities are ordered from the most optimal one to the least optimal one.
getAffinityRanking in interface HasAffinityRankingpublic Double getEntityAffinity()
HasEntityAffinityGets the affinity towards the winning entity.
getEntityAffinity in interface HasEntityAffinityprotected static Classification.Type validateType(Classification.Type type)
Copyright © 2015. All Rights Reserved.