Package uk.ac.starlink.topcat
Class Classifier<T>
java.lang.Object
uk.ac.starlink.topcat.Classifier<T>
Categorises submitted data values by equality into a set of
mutually exclusive groups.
- Since:
- 3 Feb 2015
- Author:
- Mark Taylor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Aggregates a value and the number of times it has been submitted. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the number of values submitted so far.getThresholdValues
(int minCount) Returns a sorted list of the values with a certain minimum count.getTopValues
(int nValue) Returns a sorted list of the N most popular values.long
Returns the number of distinct values seen so far.void
Submits a value for categorisation.
-
Constructor Details
-
Classifier
public Classifier()Constructor.
-
-
Method Details
-
submit
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
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
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
-