Package org.jpmml.evaluator
Class AffinityDistribution<V extends Number>
- java.lang.Object
-
- org.jpmml.evaluator.AbstractComputable
-
- org.jpmml.evaluator.Classification<String,V>
-
- org.jpmml.evaluator.AffinityDistribution<V>
-
- All Implemented Interfaces:
CategoricalResultFeature<String>,Computable,HasAffinity,HasAffinityRanking,HasEntityAffinity,HasEntityId,HasEntityIdRanking,HasPrediction,ResultFeature
public class AffinityDistribution<V extends Number> extends Classification<String,V> implements HasEntityIdRanking, HasAffinityRanking, HasEntityAffinity
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jpmml.evaluator.Classification
Classification.Type
-
-
Constructor Summary
Constructors Constructor Description AffinityDistribution(Classification.Type type, ValueMap<String,V> values, Object result)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomputeResult(org.dmg.pmml.DataType dataType)DoublegetAffinity(String category)Gets the affinity towards the specified category.List<Double>getAffinityRanking()Gets the affinities for known categories.ReportgetAffinityReport(String category)Set<String>getCategories()Gets the set of known categories.DoublegetEntityAffinity()Gets the affinity towards the winning entity.StringgetEntityId()Gets theEntity identifier.List<String>getEntityIdRanking()static Classification.TypevalidateType(Classification.Type type)-
Methods inherited from class org.jpmml.evaluator.Classification
entryKeys, entryValues, getPrediction, getPredictionReport, getResult, getType, getValue, getValueReport, getValues, getWinner, getWinnerList, put
-
Methods inherited from class org.jpmml.evaluator.AbstractComputable
toString
-
-
-
-
Constructor Detail
-
AffinityDistribution
public AffinityDistribution(Classification.Type type, ValueMap<String,V> values, Object result)
-
-
Method Detail
-
computeResult
public void computeResult(org.dmg.pmml.DataType dataType)
-
getCategories
public Set<String> getCategories()
Description copied from interface: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.
- Specified by:
getCategoriesin interfaceCategoricalResultFeature<V extends Number>
-
getEntityId
public String getEntityId()
Description copied from interface:HasEntityIdGets the
Entity identifier.- Specified by:
getEntityIdin interfaceHasEntityId
-
getEntityIdRanking
public List<String> getEntityIdRanking()
- Specified by:
getEntityIdRankingin interfaceHasEntityIdRanking
-
getAffinity
public Double getAffinity(String category)
Description copied from interface:HasAffinityGets the affinity towards the specified category.
- Specified by:
getAffinityin interfaceHasAffinity- 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
public Report getAffinityReport(String category)
- Specified by:
getAffinityReportin interfaceHasAffinity- See Also:
CategoricalResultFeature.getCategories()
-
getAffinityRanking
public List<Double> getAffinityRanking()
Description copied from interface:HasAffinityRankingGets the affinities for known categories.
Affinities are ordered from the most optimal one to the least optimal one.
- Specified by:
getAffinityRankingin interfaceHasAffinityRanking
-
getEntityAffinity
public Double getEntityAffinity()
Description copied from interface:HasEntityAffinityGets the affinity towards the winning entity.
- Specified by:
getEntityAffinityin interfaceHasEntityAffinity- See Also:
HasEntityId.getEntityId()
-
validateType
public static Classification.Type validateType(Classification.Type type)
-
-