Package org.jpmml.evaluator.clustering
Class ClusterAffinityDistribution<V extends Number>
- java.lang.Object
-
- org.jpmml.evaluator.AbstractComputable
-
- org.jpmml.evaluator.Classification<K,V>
-
- org.jpmml.evaluator.EntityClassification<org.dmg.pmml.clustering.Cluster,String,V>
-
- org.jpmml.evaluator.clustering.ClusterAffinityDistribution<V>
-
- All Implemented Interfaces:
CategoricalResultFeature<String>,Computable,HasAffinity,HasAffinityRanking,HasDisplayValue,HasEntityAffinity,HasEntityId,HasEntityIdRanking,HasEntityRegistry<org.dmg.pmml.clustering.Cluster>,HasPrediction,ResultFeature
public abstract class ClusterAffinityDistribution<V extends Number> extends EntityClassification<org.dmg.pmml.clustering.Cluster,String,V> implements HasEntityIdRanking, HasDisplayValue, HasAffinityRanking, HasEntityAffinity
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jpmml.evaluator.Classification
Classification.Type
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.StringgetDisplayValue()DoublegetEntityAffinity()Gets the affinity towards the winning entity.List<String>getEntityIdRanking()voidput(org.dmg.pmml.clustering.Cluster entity, Value<V> value)-
Methods inherited from class org.jpmml.evaluator.EntityClassification
getEntity, getEntityId, put
-
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
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jpmml.evaluator.HasEntityId
getEntityId
-
Methods inherited from interface org.jpmml.evaluator.HasEntityRegistry
getEntityRegistry
-
-
-
-
Method Detail
-
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>
-
getEntityIdRanking
public List<String> getEntityIdRanking()
- Specified by:
getEntityIdRankingin interfaceHasEntityIdRanking
-
getDisplayValue
public String getDisplayValue()
- Specified by:
getDisplayValuein interfaceHasDisplayValue
-
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()
-
-