java.lang.Object
com.pervasive.datarush.analytics.stats.DiscreteStatistics
Object representation of the PMML
DiscrStats element.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the most frequent value of the fieldlonggetValueCount(String value) Returns the number of occurrences of the given valueReturns 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.
-
Constructor Details
-
DiscreteStatistics
public DiscreteStatistics()Creates an emptyDiscrStatselement.
-
-
Method Details
-
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
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
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
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
Returns the most frequent value of the field- Returns:
- the most frequent value of the field
-
setModalValue
Sets the most frequent value of the field- Parameters:
modalValue- the most frequent value of the field
-