public class Stat
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Stat.chisq
Chi-square test.
|
static class |
Stat.cor
Correlation test.
|
static class |
Stat.F
F-test.
|
static class |
Stat.KS
The Kolmogorov-Smirnov test (K-S test).
|
static class |
Stat.t
t-test.
|
| Modifier and Type | Method and Description |
|---|---|
static double |
bic(double L,
int v,
int n)
Bayesian information criterion (BIC).
|
static double |
GoodTuring(int[] r,
int[] Nr,
double[] p)
Good–Turing frequency estimation.
|
public static double bic(double L,
int v,
int n)
When estimating model parameters using maximum likelihood estimation, it is possible to increase the likelihood by adding additional parameters, which may result in over-fitting. The BIC resolves this problem by introducing a penalty term for the number of parameters in the model. BIC is very closely related to the Akaike information criterion (AIC). However, its penalty for additional parameters is stronger than that of AIC.
The formula for the BIC is BIC = L - 0.5 * v * log n where L is the log-likelihood of estimated model, v is the number of free parameters to be estimated in the model, and n is the number of samples.
Given any two estimated models, the model with the larger value of BIC is the one to be preferred.
L - the log-likelihood of estimated model.v - the number of free parameters to be estimated in the model.n - the number of samples.public static double GoodTuring(int[] r,
int[] Nr,
double[] p)
r - the frequency in ascending order.Nr - the frequency of frequencies.p - on output, it is the estimated probabilities.