Package org.jpmml.evaluator
Class Classification<K,V extends java.lang.Number>
- java.lang.Object
-
- org.jpmml.evaluator.AbstractComputable
-
- org.jpmml.evaluator.Classification<K,V>
-
- All Implemented Interfaces:
Computable,HasPrediction,ResultFeature
- Direct Known Subclasses:
AffinityDistribution,AggregateVoteDistribution,ConfidenceDistribution,DistanceDistribution,EntityClassification,NodeScoreDistribution,ProbabilityDistribution,VoteDistribution
public class Classification<K,V extends java.lang.Number> extends AbstractComputable implements HasPrediction
- See Also:
MiningFunction.CLASSIFICATION,MiningFunction.CLUSTERING
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClassification.Type
-
Constructor Summary
Constructors Modifier Constructor Description protectedClassification(Classification.Type type, ValueMap<K,V> values)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcomputeResult(org.dmg.pmml.DataType dataType)protected static <K,V extends java.lang.Number>
com.google.common.collect.Ordering<java.util.Map.Entry<K,Value<V>>>createOrdering(Classification.Type type)static <K,V>
java.util.List<K>entryKeys(java.util.List<java.util.Map.Entry<K,V>> entries)protected java.util.Set<java.util.Map.Entry<K,Value<V>>>entrySet()static <K,V>
java.util.List<V>entryValues(java.util.List<java.util.Map.Entry<K,V>> entries)java.lang.ObjectgetPrediction()ReportgetPredictionReport()java.lang.ObjectgetResult()Classification.TypegetType()java.lang.DoublegetValue(K key)ReportgetValueReport(K key)ValueMap<K,V>getValues()protected java.util.Map.Entry<K,Value<V>>getWinner()static <K,V extends java.lang.Number>
java.util.Map.Entry<K,Value<V>>getWinner(Classification.Type type, java.util.Collection<java.util.Map.Entry<K,Value<V>>> entries)protected java.util.List<K>getWinnerKeys()static <K,V extends java.lang.Number>
java.util.List<java.util.Map.Entry<K,Value<V>>>getWinnerList(Classification.Type type, java.util.Collection<java.util.Map.Entry<K,Value<V>>> entries)protected java.util.List<java.util.Map.Entry<K,Value<V>>>getWinnerRanking()protected java.util.List<java.lang.Double>getWinnerValues()protected java.util.Set<K>keySet()voidput(K key, Value<V> value)protected voidsetResult(java.lang.Object result)protected org.jpmml.model.ToStringHelpertoStringHelper()-
Methods inherited from class org.jpmml.evaluator.AbstractComputable
toString
-
-
-
-
Constructor Detail
-
Classification
protected Classification(Classification.Type type, ValueMap<K,V> values)
-
-
Method Detail
-
getResult
public java.lang.Object getResult()
- Specified by:
getResultin interfaceComputable
-
setResult
protected void setResult(java.lang.Object result)
-
computeResult
protected void computeResult(org.dmg.pmml.DataType dataType)
-
getPrediction
public java.lang.Object getPrediction()
- Specified by:
getPredictionin interfaceHasPrediction
-
getPredictionReport
public Report getPredictionReport()
- Specified by:
getPredictionReportin interfaceHasPrediction
-
toStringHelper
protected org.jpmml.model.ToStringHelper toStringHelper()
- Overrides:
toStringHelperin classAbstractComputable
-
getValue
public java.lang.Double getValue(K key)
-
getWinnerKeys
protected java.util.List<K> getWinnerKeys()
-
getWinnerValues
protected java.util.List<java.lang.Double> getWinnerValues()
-
keySet
protected java.util.Set<K> keySet()
-
getType
public Classification.Type getType()
-
getWinner
public static <K,V extends java.lang.Number> java.util.Map.Entry<K,Value<V>> getWinner(Classification.Type type, java.util.Collection<java.util.Map.Entry<K,Value<V>>> entries)
-
getWinnerList
public static <K,V extends java.lang.Number> java.util.List<java.util.Map.Entry<K,Value<V>>> getWinnerList(Classification.Type type, java.util.Collection<java.util.Map.Entry<K,Value<V>>> entries)
-
createOrdering
protected static <K,V extends java.lang.Number> com.google.common.collect.Ordering<java.util.Map.Entry<K,Value<V>>> createOrdering(Classification.Type type)
-
entryKeys
public static <K,V> java.util.List<K> entryKeys(java.util.List<java.util.Map.Entry<K,V>> entries)
-
entryValues
public static <K,V> java.util.List<V> entryValues(java.util.List<java.util.Map.Entry<K,V>> entries)
-
-