@PublicationReference(author="Yao-Tsung Chen, Meng Chang Chen", title="Using chi-square statistics to measure similarities for text categorization", type=Journal, year=2011, url="http://www.sciencedirect.com/science/article/pii/S0957417410008961#") public class ChiSquaredSimilarity extends java.lang.Object
| Constructor and Description |
|---|
ChiSquaredSimilarity(Vector categorizedVector,
Vector testingVector)
Basic constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
compute()
Computes the chi-squared statistic of the two vectors.
|
double |
computeCumulativeProbabilityValue()
Computes the chi-squared similarity statistic, then uses that to compute
a cumulative probability.
|
Vector |
getCategorizedVector()
Basic getter for the categorized vector.
|
Vector |
getTestVector()
Basic getter for the testing vector.
|
void |
setCategorizedVector(Vector newCategorizedVector)
Basic setter for the categorized vector.
|
void |
setTestVector(Vector newTestVector)
Basic setter for the test vector.
|
public ChiSquaredSimilarity(Vector categorizedVector, Vector testingVector)
categorizedVector - The vector from a known category.testingVector - The vector which is being tested to see if it comes from the same category.public void setCategorizedVector(Vector newCategorizedVector)
newCategorizedVector - public void setTestVector(Vector newTestVector)
newTestVector - public Vector getCategorizedVector()
public Vector getTestVector()
public double compute()
public double computeCumulativeProbabilityValue()