- java.lang.Object
-
- com.pervasive.datarush.analytics.stats.DiscreteStatistics
-
public final class DiscreteStatistics extends Object
Object representation of the PMMLDiscrStatselement.- See Also:
PMMLSummaryStatisticsModel
-
-
Constructor Summary
Constructors Constructor Description DiscreteStatistics()Creates an emptyDiscrStatselement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetModalValue()Returns the most frequent value of the fieldlonggetValueCount(String value)Returns the number of occurrences of the given valueMap<String,Long>getValueCounts()Returns a mapping of discrete value counts.voidsetModalValue(String modalValue)Sets the most frequent value of the fieldvoidsetValueCounts(String value, long count)Sets the number of occurrences of the given valuevoidsetValueCounts(Map<String,Long> valueCounts)Sets a mapping of discrete value counts.
-
-
-
Method Detail
-
getValueCounts
public Map<String,Long> getValueCounts()
Returns a mapping of discrete value counts. The keys in the map correspond to the field values. The values in the map are the number of occurrences of the field value.- Returns:
- a mapping of discrete value counts
-
setValueCounts
public void setValueCounts(Map<String,Long> valueCounts)
Sets a mapping of discrete value counts. The keys in the map correspond to the field values. The values in the map are the number of occurrences of the field value.- Parameters:
valueCounts- a mapping of discrete value counts
-
getValueCount
public long getValueCount(String value)
Returns the number of occurrences of the given value- Parameters:
value- a discrete value of the field.- Returns:
- the number of occurrences of the given value
-
setValueCounts
public void setValueCounts(String value, long count)
Sets the number of occurrences of the given value- Parameters:
value- a discrete value of the field.count- the number of occurrences of the given value
-
getModalValue
public String getModalValue()
Returns the most frequent value of the field- Returns:
- the most frequent value of the field
-
setModalValue
public void setModalValue(String modalValue)
Sets the most frequent value of the field- Parameters:
modalValue- the most frequent value of the field
-
-