Package org.jpmml.evaluator.clustering
Class ClusterAffinityDistribution<V extends java.lang.Number>
- java.lang.Object
-
- org.jpmml.evaluator.AbstractComputable
-
- org.jpmml.evaluator.Classification<K,V>
-
- org.jpmml.evaluator.EntityClassification<org.dmg.pmml.clustering.Cluster,java.lang.String,V>
-
- org.jpmml.evaluator.clustering.ClusterAffinityDistribution<V>
-
- All Implemented Interfaces:
CategoricalResultFeature<java.lang.String>,Computable,HasAffinity,HasAffinityRanking,HasDisplayValue,HasEntityAffinity,HasEntityId,HasEntityIdRanking,HasEntityRegistry<org.dmg.pmml.clustering.Cluster>,HasPrediction,ResultFeature
public abstract class ClusterAffinityDistribution<V extends java.lang.Number> extends EntityClassification<org.dmg.pmml.clustering.Cluster,java.lang.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 protected 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.StringgetDisplayValue()java.lang.DoublegetEntityAffinity()Gets the affinity towards the winning entity.java.util.List<java.lang.String>getEntityIdRanking()voidput(org.dmg.pmml.clustering.Cluster entity, Value<V> value)-
Methods inherited from class org.jpmml.evaluator.EntityClassification
getEntity, getEntityId, put, setEntity, toStringHelper
-
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
-
Methods inherited from class org.jpmml.evaluator.AbstractComputable
toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, 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
-
computeResult
protected 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>
-
getEntityIdRanking
public java.util.List<java.lang.String> getEntityIdRanking()
- Specified by:
getEntityIdRankingin interfaceHasEntityIdRanking
-
getDisplayValue
public java.lang.String getDisplayValue()
- Specified by:
getDisplayValuein interfaceHasDisplayValue
-
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()
-
-