public class PercentageScore extends SignificanceHeuristic
Modifier and Type | Class and Description |
---|---|
static class |
PercentageScore.PercentageScoreBuilder |
static class |
PercentageScore.PercentageScoreParser |
Modifier and Type | Field and Description |
---|---|
static PercentageScore |
INSTANCE |
protected static String[] |
NAMES |
static SignificanceHeuristicStreams.Stream |
STREAM |
Modifier and Type | Method and Description |
---|---|
double |
getScore(long subsetFreq,
long subsetSize,
long supersetFreq,
long supersetSize)
Indicates the significance of a term in a sample by determining what percentage
of all occurrences of a term are found in the sample.
|
static SignificanceHeuristic |
readFrom(StreamInput in) |
void |
writeTo(StreamOutput out) |
checkFrequencyValidity, initialize
public static final PercentageScore INSTANCE
protected static final String[] NAMES
public static final SignificanceHeuristicStreams.Stream STREAM
public static SignificanceHeuristic readFrom(StreamInput in) throws IOException
IOException
public double getScore(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize)
getScore
in class SignificanceHeuristic
subsetFreq
- The frequency of the term in the selected samplesubsetSize
- The size of the selected sample (typically number of docs)supersetFreq
- The frequency of the term in the superset from which the sample was takensupersetSize
- The size of the superset from which the sample was taken (typically number of docs)public void writeTo(StreamOutput out) throws IOException
writeTo
in class SignificanceHeuristic
IOException
Copyright © 2009–2016. All rights reserved.