public class ChiSquare extends NXYSignificanceHeuristic
| Modifier and Type | Class and Description |
|---|---|
static class |
ChiSquare.ChiSquareBuilder |
static class |
ChiSquare.ChiSquareParser |
NXYSignificanceHeuristic.Frequencies, NXYSignificanceHeuristic.NXYBuilder, NXYSignificanceHeuristic.NXYParser| Modifier and Type | Field and Description |
|---|---|
protected static ParseField |
NAMES_FIELD |
static SignificanceHeuristicStreams.Stream |
STREAM |
BACKGROUND_IS_SUPERSET, backgroundIsSuperset, INCLUDE_NEGATIVES_FIELD, includeNegatives, SCORE_ERROR_MESSAGE| Constructor and Description |
|---|
ChiSquare(boolean includeNegatives,
boolean backgroundIsSuperset) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
double |
getScore(long subsetFreq,
long subsetSize,
long supersetFreq,
long supersetSize)
Calculates Chi^2
see "Information Retrieval", Manning et al., Eq.
|
int |
hashCode() |
void |
writeTo(StreamOutput out) |
checkFrequencies, computeNxyscheckFrequencyValidity, initializeprotected static final ParseField NAMES_FIELD
public static final SignificanceHeuristicStreams.Stream STREAM
public ChiSquare(boolean includeNegatives,
boolean backgroundIsSuperset)
public boolean equals(Object other)
equals in class NXYSignificanceHeuristicpublic int hashCode()
hashCode in class NXYSignificanceHeuristicpublic double getScore(long subsetFreq,
long subsetSize,
long supersetFreq,
long supersetSize)
getScore in class SignificanceHeuristicsubsetFreq - 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 NXYSignificanceHeuristicIOExceptionCopyright © 2009–2017. All rights reserved.