Package org.jpmml.evaluator
Class AffinityDistribution<V extends java.lang.Number>
- java.lang.Object
-
- org.jpmml.evaluator.AbstractComputable
-
- org.jpmml.evaluator.Classification<java.lang.String,V>
-
- org.jpmml.evaluator.AffinityDistribution<V>
-
- All Implemented Interfaces:
CategoricalResultFeature<java.lang.String>,Computable,HasAffinity,HasAffinityRanking,HasEntityAffinity,HasEntityId,HasEntityIdRanking,HasPrediction,ResultFeature
public class AffinityDistribution<V extends java.lang.Number> extends Classification<java.lang.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<java.lang.String,V> values, java.lang.Object result)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomputeResult(org.dmg.pmml.DataType dataType)java.lang.DoublegetAffinity(java.lang.String category)Gets the affinity towards the specified category.java.util.List<java.lang.Double>getAffinityRanking()Gets the affinities for known categories.ReportgetAffinityReport(java.lang.String category)java.util.Set<java.lang.String>getCategories()Gets the set of known categories.java.lang.DoublegetEntityAffinity()Gets the affinity towards the winning entity.java.lang.StringgetEntityId()Gets theEntity identifier.java.util.List<java.lang.String>getEntityIdRanking()static Classification.TypevalidateType(Classification.Type type)-
Methods inherited from class org.jpmml.evaluator.Classification
createOrdering, entryKeys, entrySet, entryValues, getPrediction, getPredictionReport, getResult, getType, getValue, getValueReport, getValues, getWinner, getWinner, getWinnerKeys, getWinnerList, getWinnerRanking, getWinnerValues, keySet, put, setResult, toStringHelper
-
Methods inherited from class org.jpmml.evaluator.AbstractComputable
toString
-
-
-
-
Constructor Detail
-
AffinityDistribution
public AffinityDistribution(Classification.Type type, ValueMap<java.lang.String,V> values, java.lang.Object result)
-
-
Method Detail
-
computeResult
public void computeResult(org.dmg.pmml.DataType dataType)
- Overrides:
computeResultin classClassification<java.lang.String,V extends java.lang.Number>
-
getCategories
public java.util.Set<java.lang.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 java.lang.Number>
-
getEntityId
public java.lang.String getEntityId()
Description copied from interface:HasEntityIdGets the
Entity identifier.- Specified by:
getEntityIdin interfaceHasEntityId
-
getEntityIdRanking
public java.util.List<java.lang.String> getEntityIdRanking()
- Specified by:
getEntityIdRankingin interfaceHasEntityIdRanking
-
getAffinity
public java.lang.Double getAffinity(java.lang.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(java.lang.String category)
- Specified by:
getAffinityReportin interfaceHasAffinity- See Also:
CategoricalResultFeature.getCategories()
-
getAffinityRanking
public java.util.List<java.lang.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 java.lang.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)
-
-