Class Classifier<T>

java.lang.Object
uk.ac.starlink.topcat.Classifier<T>

public class Classifier<T> extends Object
Categorises submitted data values by equality into a set of mutually exclusive groups.
Since:
3 Feb 2015
Author:
Mark Taylor
  • Constructor Details

    • Classifier

      public Classifier()
      Constructor.
  • Method Details

    • submit

      public void submit(T value)
      Submits a value for categorisation.
      Parameters:
      value - value
    • getItemCount

      public long getItemCount()
      Returns the number of values submitted so far.
      Returns:
      total item count
    • getValueCount

      public long getValueCount()
      Returns the number of distinct values seen so far.
      Returns:
      number of distinct values
    • getTopValues

      public SortedSet<Classifier.CountedValue<T>> getTopValues(int nValue)
      Returns a sorted list of the N most popular values.
      Parameters:
      nValue - maximum number of values to return
      Returns:
      collection of submitted values, in descending order of popularity
    • getThresholdValues

      public Collection<Classifier.CountedValue<T>> getThresholdValues(int minCount)
      Returns a sorted list of the values with a certain minimum count.
      Parameters:
      minCount - minimum number of submissions for each returned value
      Returns:
      collection of submitted values, in descending order of popularity