|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpapaya.Linear.BoxCox
public static class Linear.BoxCox
Contains methods related to the Box-Cox transformation of a data set; useful in
determining the best transformation that will yield the best method for converting
a monotonic, non-linear relationship between x
and y
into
a linear one.
Reference:
Box, George E. P.; Cox, D. R. (1964). "An analysis of transformations".
Journal of the Royal Statistical Society, Series B 26 (2): 211?252.
NIST/SEMATECH e-Handbook of Statistical Methods, EDA Section 1.3.3.6: Box-Cox Linearity Plots
(The reader's digest version of the original.)
Method Summary | |
---|---|
static float[] |
correlation(float[] x,
float[] y,
float[] lambda)
Performs the box-cox transformation on y for a sequence of λ
and returns the array of linear correlation coefficients
between the x and the box-cox transformed y . |
static float[] |
transform(float[] data,
float lambda)
Performs the box-cox transformation, returning the transformed data. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static float[] correlation(float[] x, float[] y, float[] lambda)
y
for a sequence of λ
and returns the array of linear correlation coefficients
between the x
and the box-cox transformed y
.
at each value of λ .
The value of λ corresponding to the maximum correlation
(or minimum for negative correlation) is the optimal choice for
λ such that the relationship between x and T(y) is linear.
Reference:
NIST/SEMATECH e-Handbook of Statistical Methods, EDA Section 1.3.3.6: Box-Cox Linearity Plots
x
- the independent data arrayy
- the dependent data arraylambda
- an array of lambda values
public static float[] transform(float[] data, float lambda)
y[i](λ) = (y[i]^λ-1) / λ if λ ≠ 0 y[i](λ) = log(y[i])if λ = 0Requirements: all elements of
y
are >0.
data
- the data to be transformedlambda
- the lambda value
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |