Class DiscreteStatistics

    • Constructor Detail

      • DiscreteStatistics

        public DiscreteStatistics()
        Creates an empty DiscrStats element.
    • 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